diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-04-27 08:49:11 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-04-27 08:49:11 +0000 |
commit | 5d77927ffde695fb659af9d1ce3fb9df5a795179 (patch) | |
tree | 086943a99121e6761f2595db08cbf270b66da6fa /Completion | |
parent | 42771216622146246c94e35e4c9dbc2073e7deda (diff) | |
download | zsh-5d77927ffde695fb659af9d1ce3fb9df5a795179.tar.gz zsh-5d77927ffde695fb659af9d1ce3fb9df5a795179.tar.xz zsh-5d77927ffde695fb659af9d1ce3fb9df5a795179.zip |
27911: no completion colouring with old lists when turned off
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Base/Core/_main_complete | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete index a2bf8e144..c7d0d5f4d 100644 --- a/Completion/Base/Core/_main_complete +++ b/Completion/Base/Core/_main_complete @@ -30,7 +30,8 @@ local func funcs ret=1 tmp _compskip format nm call match min max i num\ _saved_lastprompt="${compstate[last_prompt]}" \ _saved_list="${compstate[list]}" \ _saved_insert="${compstate[insert]}" \ - _saved_colors="$ZLS_COLORS" + _saved_colors="$ZLS_COLORS" \ + _saved_colors_set=${+ZLS_COLORS} # _precommand sets this to indicate we are following a precommand modifier local -a precommands @@ -325,7 +326,11 @@ fi compstate[list]="${compstate[list]//messages} force" if [[ "$compstate[old_list]" = keep ]]; then - ZLS_COLORS="$_saved_colors" + if [[ $_saved_colors_set = 1 ]]; then + ZLS_COLORS="$_saved_colors" + else + unset ZLS_COLORS + fi elif (( $#_comp_colors )); then ZLS_COLORS="${(j.:.)_comp_colors}" else |