From e39e024e741bdfa139a700eccd4e481affdbf4a0 Mon Sep 17 00:00:00 2001 From: Ythildir Date: Sat, 21 Jul 2018 22:52:08 +0200 Subject: [PATCH 1/2] Resolve #918 Transparent background Now function getColorCode consider value 'none' like a good value. When it's use to set background the segment become transparent --- functions/colors.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/colors.zsh b/functions/colors.zsh index e98bfd4f..81e96ae1 100755 --- a/functions/colors.zsh +++ b/functions/colors.zsh @@ -79,6 +79,10 @@ function getColorCode() { else echo -n "$1" fi + # Check if value is none with any case. + elif [[ $1 = [nN][oO][nN][eE] ]] + then + echo -n 'none' else typeset -A codes # https://jonasjacek.github.io/colors/ From 5ce384fb315528cefb33e76793f27c6b7936185a Mon Sep 17 00:00:00 2001 From: Ythildir Date: Sun, 22 Jul 2018 00:21:59 +0200 Subject: [PATCH 2/2] Test more readable --- functions/colors.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/colors.zsh b/functions/colors.zsh index 81e96ae1..7befbb2c 100755 --- a/functions/colors.zsh +++ b/functions/colors.zsh @@ -80,7 +80,7 @@ function getColorCode() { echo -n "$1" fi # Check if value is none with any case. - elif [[ $1 = [nN][oO][nN][eE] ]] + elif [[ "${(L)1}" == "none" ]] then echo -n 'none' else