false case scenario
This commit is contained in:
+6
-2
@@ -25,7 +25,7 @@ BG_COLORS["BLUE"]='\e[44m'
|
||||
BG_COLORS["PURPLE"]='\e[45m'
|
||||
BG_COLORS["CYAN"]='\e[46m'
|
||||
BG_COLORS["WHITE"]='\e[47m'
|
||||
BG_COLORS["GRAY"]='\e[90m'
|
||||
# BG_COLORS["GRAY"]='\e[90m'
|
||||
# BG_COLORS["MAGENTA"]='\e[95m'
|
||||
|
||||
# FUNCTIONS
|
||||
@@ -55,7 +55,11 @@ function _style_fg {
|
||||
}
|
||||
|
||||
function _style_bg {
|
||||
[[ -n $1 ]] && echo "${BG_COLORS[$1]}" || true
|
||||
if [[ -n "$1" ]]; then
|
||||
[[ -v BG_COLORS[$1] ]] && echo "${BG_COLORS[$1]}" && return
|
||||
>&2 echo "unknown BG value: $1"
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
function style_ansi {
|
||||
|
||||
Reference in New Issue
Block a user