summaryrefslogtreecommitdiffstats
path: root/Completion/Core/_main_complete
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-12 09:28:56 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-12 09:28:56 +0000
commit5de84477acd1abe1f192547ea22c46bcca9be63c (patch)
tree2e52416b7fe8f9944828724a8129cc2d2f4dc6e6 /Completion/Core/_main_complete
parentcomment out the code to allow $compstate[insert] to select the group (10690) (diff)
downloadzsh-5de84477acd1abe1f192547ea22c46bcca9be63c.tar
zsh-5de84477acd1abe1f192547ea22c46bcca9be63c.tar.gz
zsh-5de84477acd1abe1f192547ea22c46bcca9be63c.tar.bz2
zsh-5de84477acd1abe1f192547ea22c46bcca9be63c.tar.lz
zsh-5de84477acd1abe1f192547ea22c46bcca9be63c.tar.xz
zsh-5de84477acd1abe1f192547ea22c46bcca9be63c.tar.zst
zsh-5de84477acd1abe1f192547ea22c46bcca9be63c.zip
keep _oldlist from using the dummy match inserted for warnings (10691)
Diffstat (limited to 'Completion/Core/_main_complete')
-rw-r--r--Completion/Core/_main_complete8
1 files changed, 5 insertions, 3 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index 90bdef648..795fe7442 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -19,7 +19,7 @@
setopt localoptions nullglob rcexpandparam extendedglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
-local func funcs ret=1 tmp _compskip format \
+local func funcs ret=1 tmp _compskip format nm \
_completers _completer _completer_num curtag \
_matchers _matcher _matcher_num _comp_tags \
context state line opt_args val_args curcontext="$curcontext" \
@@ -105,8 +105,9 @@ for tmp in "$_completers[@]"; do
done
curcontext="${curcontext/:[^:]#:/::}"
+nm=$compstate[nmatches]
-if [[ $compstate[old_list] = keep || $compstate[nmatches] -gt 1 ]]; then
+if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
[[ _last_nmatches -ge 0 && _last_nmatches -ne $compstate[nmatches] ]] &&
_menu_style=( "$_last_menu_style[@]" "$_menu_style[@]" )
@@ -160,7 +161,7 @@ if [[ $compstate[old_list] = keep || $compstate[nmatches] -gt 1 ]]; then
fi
fi
fi
-elif [[ $compstate[nmatches] -eq 0 &&
+elif [[ nm -eq 0 &&
$#_lastdescr -ne 0 && $compstate[old_list] != keep ]] &&
zstyle -s ":completion:${curcontext}:warnings" format format; then
@@ -195,6 +196,7 @@ for func in "$funcs[@]"; do
done
_lastcomp=( "${(@kv)compstate}" )
+_lastcomp[nmatches]=$nm
_lastcomp[completer]="$_completer"
_lastcomp[prefix]="$PREFIX"
_lastcomp[suffix]="$SUFFIX"