From f085f0494b69a3f56cfc245e7b7e7a59a47688d3 Mon Sep 17 00:00:00 2001 From: mglae Date: Tue, 27 Nov 2018 19:38:10 +0100 Subject: [PATCH] config/functions: fix custom colors --- config/functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/functions b/config/functions index c36d1ac633..de993467ef 100644 --- a/config/functions +++ b/config/functions @@ -69,10 +69,14 @@ print_color() { # "standard" color determined by an indirect name (CLR_ERROR etc.) # # If ${!clr_name} doesn't exist then assume it's a standard color. + # If ${!clr_name} does exist then check it's not a custom color mapping. + # Custom color mappings can be configured in options files. # clr_actual="${!clr_name}" - if [ -z "${clr_actual}" ]; then + if [ -n "${clr_actual}" ]; then + clr_actual="${!clr_actual}" + else case "${clr_name}" in CLR_ERROR) clr_actual="${boldred}";; CLR_WARNING) clr_actual="${boldred}";;