From f7ca3b8e17b2c56f16765a5cbb36358276cc215e Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 26 Mar 2001 09:15:45 +0000 Subject: unset ZLS_COLORS if list-colors not set (13768) --- ChangeLog | 4 ++++ Completion/Core/_main_complete | 4 +++- 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 + * 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 -- cgit 1.4.1