diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-22 08:42:36 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-22 08:42:36 +0000 |
commit | b9a533f3823c3b6d69fad80a21f573670856823f (patch) | |
tree | eca8b47b9101c1060f41500f9fb23e679ec8f94f /Completion/Core/_setup | |
parent | 44b34667f844ce57b5b2eba0f2870c1ec7630348 (diff) | |
download | zsh-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/_setup | 12 |
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. |