fix grep deprecation, change name to get block to list block, refactor verbosity on module functions
parent
189ba95076
commit
9fb8af9a09
|
@ -1,10 +1,8 @@
|
|||
#!/bin/bash
|
||||
export TERM=xterm-color
|
||||
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
|
||||
export CLICOLOR=1
|
||||
export LSCOLORS=ExFxCxDxBxegedabagacad
|
||||
|
||||
|
||||
export COLOR_NC='\e[0m' # No Color
|
||||
export COLOR_BLACK='\e[0;30m'
|
||||
export COLOR_GRAY='\e[1;30m'
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
alias grep="grep --color=auto"
|
||||
alias fgrep="fgrep --color=auto"
|
||||
alias egrep="egrep --color=auto"
|
|
@ -87,9 +87,11 @@ module_loaded () {
|
|||
# echo "$(function_list $file)"
|
||||
for func in $(function_list $file)
|
||||
do
|
||||
[ ! $(function_list | grep $func) ] && echo "$func not loaded" && ret=1 || echo "$func loaded"
|
||||
[ ! $(function_list | grep $func) ] && ret=1
|
||||
[[ $2 = -vv ]] && ([[ $ret = 0 ]] && echo "$func loaded" || echo "$func not loaded")
|
||||
done
|
||||
[ $ret = 0 ] && echo all functions loaded
|
||||
[[ $2 = -v ]] && echo "module: $1" && ([[ $ret = 0 ]] && echo "all functions " || echo "some or all functions not loaded")
|
||||
[[ $ret = 0 ]] && echo "loaded"
|
||||
return $ret
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ else
|
|||
fi
|
||||
}
|
||||
|
||||
get_block () {
|
||||
list_block () {
|
||||
if [[ $1 =~ -?r(aw)? ]]; then
|
||||
echo $BLOCK
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue