about summary refs log tree commit diff
path: root/Completion/Core/_setup
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/_setup
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/_setup')
-rw-r--r--Completion/Core/_setup12
1 files changed, 3 insertions, 9 deletions
diff --git a/Completion/Core/_setup b/Completion/Core/_setup
index 50e3dbfd8..1278fa1ba 100644
--- a/Completion/Core/_setup
+++ b/Completion/Core/_setup
@@ -7,16 +7,10 @@ local val nm="$compstate[nmatches]"
 if zstyle -a ":completion:${curcontext}:$1" list-colors val; then
   zmodload -i zsh/complist
   if [[ "$1" = default ]]; then
-    ZLS_COLORS="${(j.:.)${(@)val:gs/:/\\\:}}"
+    _comp_colors=( "$val[@]" )
   else
-    local simple grouped
-
-    simple=( "(${2})${(@)^val:#\(*\)*}" )
-    grouped=( "${(M@)val:#\(*\)*}" )
-    simple="${(j.:.)simple}:"
-    grouped="${(j.:.)grouped}:"
-    [[ "$ZLS_COLORS" != *${simple}*  ]] && ZLS_COLORS="${simple}$ZLS_COLORS"
-    [[ "$ZLS_COLORS" != *${grouped}* ]] && ZLS_COLORS="${grouped}$ZLS_COLORS"
+    _comp_colors=( "$_comp_colors[@]"
+                   "(${2})${(@)^val:#\(*\)*}" "${(M@)val:#\(*\)*}" )
   fi
 
 # Here is the problem mentioned in _main_complete.