about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-26 09:15:45 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-26 09:15:45 +0000
commitf7ca3b8e17b2c56f16765a5cbb36358276cc215e (patch)
treef839513abbe1bff1cf91b0875a71dccdaf216194 /Completion
parent4e994fddced06b279f445c2919df3dc60fb0306f (diff)
downloadzsh-f7ca3b8e17b2c56f16765a5cbb36358276cc215e.tar.gz
zsh-f7ca3b8e17b2c56f16765a5cbb36358276cc215e.tar.xz
zsh-f7ca3b8e17b2c56f16765a5cbb36358276cc215e.zip
unset ZLS_COLORS if list-colors not set (13768)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_main_complete4
-rw-r--r--Completion/Core/_setup2
2 files changed, 4 insertions, 2 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index 69ee24ae2..3c2a61cce 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -302,8 +302,10 @@ fi
 
 if [[ "$compstate[old_list]" = keep ]]; then
   ZLS_COLORS="$_saved_colors"
-else
+elif (( $#_comp_colors )); then
   ZLS_COLORS="${(j.:.)_comp_colors}"
+else
+  unset ZLS_COLORS
 fi
 
 # Now call the post-functions.
diff --git a/Completion/Core/_setup b/Completion/Core/_setup
index 11b618c49..0eed7b7cb 100644
--- a/Completion/Core/_setup
+++ b/Completion/Core/_setup
@@ -20,7 +20,7 @@ if zstyle -a ":completion:${curcontext}:$1" list-colors val; then
 #   ZLS_COLORS="$ZLS_COLORS$ZLS_COLOURS"
 
 elif [[ "$1" = default ]]; then
-  ZLS_COLORS=
+  unset ZLS_COLORS
 fi
 
 if zstyle -t ":completion:${curcontext}:$1" list-packed; then