about summary refs log tree commit diff
path: root/Completion/Core/_main_complete
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-22 08:42:36 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-22 08:42:36 +0000
commitb9a533f3823c3b6d69fad80a21f573670856823f (patch)
treeeca8b47b9101c1060f41500f9fb23e679ec8f94f /Completion/Core/_main_complete
parent44b34667f844ce57b5b2eba0f2870c1ec7630348 (diff)
downloadzsh-b9a533f3823c3b6d69fad80a21f573670856823f.tar.gz
zsh-b9a533f3823c3b6d69fad80a21f573670856823f.tar.xz
zsh-b9a533f3823c3b6d69fad80a21f573670856823f.zip
allow subscripts for compadd -[ak]; new style for history completion; better list-colors handling (12029)
Diffstat (limited to 'Completion/Core/_main_complete')
-rw-r--r--Completion/Core/_main_complete8
1 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index b0798f67d..f238c88ac 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -34,7 +34,7 @@ local func funcs ret=1 tmp _compskip format nm call match \
       _saved_insert="${compstate[insert]}" \
       _saved_colors="$ZLS_COLORS"
 
-typeset -U _lastdescr _comp_ignore
+typeset -U _lastdescr _comp_ignore _comp_colors
 
 [[ -z "$curcontext" ]] && curcontext=:::
 
@@ -263,7 +263,11 @@ fi
    ( "$_comp_force_list" = ?*  && nm -ge _comp_force_list ) ]] &&
     compstate[list]="${compstate[list]//messages} force"
 
-[[ "$compstate[old_list]" = keep ]] && ZLS_COLORS="$_saved_colors"
+if [[ "$compstate[old_list]" = keep ]]; then
+  ZLS_COLORS="$_saved_colors"
+else
+  ZLS_COLORS="${(j.:.)_comp_colors}"
+fi
 
 # Now call the post-functions.