config/functions: allow null invocatin of print_color

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2018-11-19 03:38:55 +00:00
parent dfb1ae0d3e
commit 5c8bbb6fe1

View File

@ -38,6 +38,8 @@ listremoveitem() {
print_color() {
local clr_name="$1" clr_text="$2" clr_actual
[ -z "${clr_name}" ] && return 0
if [ "$DISABLE_COLORS" = "yes" ]; then
[ $# -eq 2 ] && echo -en "${clr_text}"
return 0