diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-22 12:29:47 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-22 12:29:47 +0000 |
commit | 3d9d13e918c195f974ff7b2f1dc5b65f6b20a441 (patch) | |
tree | d571aef9c8152287ed94dae1199108de80f0b984 /Completion/Core/_match | |
parent | a76b36928c5cbeef3fe015ca30bbf910ab2a107e (diff) | |
download | zsh-3d9d13e918c195f974ff7b2f1dc5b65f6b20a441.tar.gz zsh-3d9d13e918c195f974ff7b2f1dc5b65f6b20a441.tar.xz zsh-3d9d13e918c195f974ff7b2f1dc5b65f6b20a441.zip |
zsh-workers/8720
Diffstat (limited to 'Completion/Core/_match')
-rw-r--r-- | Completion/Core/_match | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Completion/Core/_match b/Completion/Core/_match index 35d7c2ecb..d5556dfcd 100644 --- a/Completion/Core/_match +++ b/Completion/Core/_match @@ -9,8 +9,8 @@ # expand-or-complete function because otherwise the pattern will # be expanded using globbing. -local tmp opm="$compstate[pattern_match]" ret=0 curcontext="$curcontext" -local orig ins +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. @@ -19,12 +19,8 @@ tmp="${${:-$PREFIX$SUFFIX}#[~=]}" [[ "$tmp:q" = "$tmp" || compstate[matcher] -ne compstate[total_matchers] ]] && return 1 -# Probably set initial context. - -[[ -z "$curcontext" ]] && curcontext=':match' - _style -s '' original orig -_style -s '' insert ins +_style -b '' insert-unambiguous ins # Try completion without inserting a `*'? @@ -36,7 +32,7 @@ if [[ -n "$orig" ]]; then compstate[matcher]="$compstate[total_matchers]" if (( ret )); then - [[ "$ins" = unambig* && + [[ "$ins" = yes && $#compstate[unambiguous] -ge ${#:-${PREFIX}${SUFFIX}} ]] && compstate[pattern_insert]=unambiguous return 0 @@ -53,7 +49,7 @@ _complete && ret=1 compstate[pattern_match]="$opm" compstate[matcher]="$compstate[total_matchers]" -[[ ret -eq 1 && "$ins" = unambig* && +[[ ret -eq 1 && "$ins" = yes && $#compstate[unambiguous] -ge ${#:-${PREFIX}${SUFFIX}} ]] && compstate[pattern_insert]=unambiguous |