diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-11 11:14:51 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-11 11:14:51 +0000 |
commit | 3076ed44d33ac699b306824214951c436c4a7a4e (patch) | |
tree | 2c743b047da4a14c36586dbf5011d80cc09e86b2 /Completion/Core/_match | |
parent | 55b8857726ee7daf75b3dc1c1dd3ca4235868fd3 (diff) | |
download | zsh-3076ed44d33ac699b306824214951c436c4a7a4e.tar.gz zsh-3076ed44d33ac699b306824214951c436c4a7a4e.tar.xz zsh-3076ed44d33ac699b306824214951c436c4a7a4e.zip |
zsh-workers/9677
Diffstat (limited to 'Completion/Core/_match')
-rw-r--r-- | Completion/Core/_match | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Completion/Core/_match b/Completion/Core/_match index 42416242d..ad481f23b 100644 --- a/Completion/Core/_match +++ b/Completion/Core/_match @@ -12,12 +12,10 @@ local tmp opm="$compstate[pattern_match]" ret=0 orig ins local curcontext="${curcontext/:[^:]#:/:match:}" -# Do nothing if we don't have a pattern or there are still global -# match specifications to try. +# Do nothing if we don't have a pattern. tmp="${${:-$PREFIX$SUFFIX}#[~=]}" -[[ "$tmp:q" = "$tmp" || - compstate[matcher] -ne compstate[total_matchers] ]] && return 1 +[[ "$tmp:q" = "$tmp" ]] && return 1 zstyle -s ":completion:${curcontext}:" original orig zstyle -b ":completion:${curcontext}:" insert-unambiguous ins @@ -25,11 +23,9 @@ zstyle -b ":completion:${curcontext}:" insert-unambiguous ins # Try completion without inserting a `*'? if [[ -n "$orig" ]]; then - compstate[matcher]=-1 compstate[pattern_match]='-' _complete && ret=1 compstate[pattern_match]="$opm" - compstate[matcher]="$compstate[total_matchers]" if (( ret )); then [[ "$ins" = yes && @@ -43,11 +39,9 @@ fi [[ "$orig" = only ]] && return 1 -compstate[matcher]=-1 compstate[pattern_match]='*' _complete && ret=1 compstate[pattern_match]="$opm" -compstate[matcher]="$compstate[total_matchers]" [[ ret -eq 1 && "$ins" = yes && $#compstate[unambiguous] -ge ${#:-${PREFIX}${SUFFIX}} ]] && |