fix grep deprecation, change name to get block to list block, refactor verbosity on module functions

master
David Kebler 2020-11-07 10:01:17 -08:00
parent 189ba95076
commit 9fb8af9a09
4 changed files with 9 additions and 6 deletions

2
env/colors.env vendored
View File

@ -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'

3
env/grep.env vendored Normal file
View File

@ -0,0 +1,3 @@
alias grep="grep --color=auto"
alias fgrep="fgrep --color=auto"
alias egrep="egrep --color=auto"

View File

@ -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
}

View File

@ -76,7 +76,7 @@ else
fi
}
get_block () {
list_block () {
if [[ $1 =~ -?r(aw)? ]]; then
echo $BLOCK
else