summaryrefslogtreecommitdiffstats
path: root/Completion/Base/Core/_setup
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/Core/_setup')
-rw-r--r--Completion/Base/Core/_setup10
1 files changed, 8 insertions, 2 deletions
diff --git a/Completion/Base/Core/_setup b/Completion/Base/Core/_setup
index d85ebb885..ca975332f 100644
--- a/Completion/Base/Core/_setup
+++ b/Completion/Base/Core/_setup
@@ -9,8 +9,7 @@ if zstyle -a ":completion:${curcontext}:$1" list-colors val; then
if [[ "$1" = default ]]; then
_comp_colors=( "$val[@]" )
else
- _comp_colors=( "$_comp_colors[@]"
- "(${2})${(@)^val:#(|\(*\)*)}" "${(M@)val:#\(*\)*}" )
+ _comp_colors+=( "(${2})${(@)^val:#(|\(*\)*)}" "${(M@)val:#\(*\)*}" )
fi
# Here is the problem mentioned in _main_complete.
@@ -23,6 +22,13 @@ elif [[ "$1" = default ]]; then
unset ZLS_COLORS ZLS_COLOURS
fi
+# What we'd like is to test that the show-ambiguity style pattern is more
+# specific than the list-colors style pattern, but that's not possible yet
+if zstyle -s ":completion:${curcontext}:$1" show-ambiguity val; then
+ zmodload -i zsh/complist
+ [[ $val = (yes|true|on) ]] && _ambiguous_color=4 || _ambiguous_color=$val
+fi
+
if zstyle -t ":completion:${curcontext}:$1" list-packed; then
compstate[list]="${compstate[list]} packed"
elif [[ $? -eq 1 ]]; then