diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-07-10 09:25:43 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-07-10 09:25:43 +0000 |
commit | bd629defe8bf49b38a0e98b82f478d02dd715a81 (patch) | |
tree | dafe7b6313e28a8e7fbeeb139d79b8781de5be7b /Completion/Base/Completer/_prefix | |
parent | 5fcfa125bd4f0006c8207d1652908348f3ea526f (diff) | |
download | zsh-bd629defe8bf49b38a0e98b82f478d02dd715a81.tar.gz zsh-bd629defe8bf49b38a0e98b82f478d02dd715a81.tar.xz zsh-bd629defe8bf49b38a0e98b82f478d02dd715a81.zip |
(15357)
Diffstat (limited to 'Completion/Base/Completer/_prefix')
-rw-r--r-- | Completion/Base/Completer/_prefix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Completion/Base/Completer/_prefix b/Completion/Base/Completer/_prefix index 86fad12dc..3ec153245 100644 --- a/Completion/Base/Completer/_prefix +++ b/Completion/Base/Completer/_prefix @@ -4,7 +4,7 @@ [[ _matcher_num -gt 1 || -z "$SUFFIX" ]] && return 1 -local comp curcontext="$curcontext" tmp \ +local comp curcontext="$curcontext" tmp suf="$SUFFIX" \ _completer _completer_num \ _matcher _c_matcher _matchers _matcher_num @@ -44,7 +44,13 @@ for tmp in "$comp[@]"; do _matcher="$_c_matcher" fi - [[ "$tmp" != _prefix ]] && "$tmp" && return 0 + if [[ "$tmp" != _prefix ]] && "$tmp"; then + [[ compstate[nmatches] -gt 1 ]] && return 0 + compadd -U -i "$IPREFIX" -I "$ISUFFIX" - "${compstate[unambiguous]%$suf}x" + compstate[list]= + compstate[insert]=unambiguous + return 0 + fi (( _matcher_num++ )) done (( _completer_num++ )) |