diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-03-26 09:15:45 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-03-26 09:15:45 +0000 |
commit | f7ca3b8e17b2c56f16765a5cbb36358276cc215e (patch) | |
tree | f839513abbe1bff1cf91b0875a71dccdaf216194 | |
parent | 4e994fddced06b279f445c2919df3dc60fb0306f (diff) | |
download | zsh-f7ca3b8e17b2c56f16765a5cbb36358276cc215e.tar.gz zsh-f7ca3b8e17b2c56f16765a5cbb36358276cc215e.tar.xz zsh-f7ca3b8e17b2c56f16765a5cbb36358276cc215e.zip |
unset ZLS_COLORS if list-colors not set (13768)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/Core/_main_complete | 4 | ||||
-rw-r--r-- | Completion/Core/_setup | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index d57d64f90..5a2ad86b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-03-26 Sven Wischnowsky <wischnow@zsh.org> + * 13768: Completion/Core/_main_complete, + Completion/Core/_setup: unset ZLS_COLORS if list-colors not + set + * 13767: Src/Zle/zle_utils.c: avoid adding empty strings to the kill ring 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 |