diff options
author | Andrey Borzenkov <bor@users.sourceforge.net> | 2001-03-06 07:47:26 +0000 |
---|---|---|
committer | Andrey Borzenkov <bor@users.sourceforge.net> | 2001-03-06 07:47:26 +0000 |
commit | eeebe3e4ec8365c038aa6186036f303a3caebe2b (patch) | |
tree | 4acebbb3327620137718c534616dcea6fc43802a /Completion/Core/_prefix | |
parent | 3e6563dd039f84990060674890c9ce9b32fd68ce (diff) | |
download | zsh-eeebe3e4ec8365c038aa6186036f303a3caebe2b.tar.gz zsh-eeebe3e4ec8365c038aa6186036f303a3caebe2b.tar.xz zsh-eeebe3e4ec8365c038aa6186036f303a3caebe2b.zip |
13544, 13568 (Peter): + syntax for matchers in matcher-list to augment
previous list
Diffstat (limited to 'Completion/Core/_prefix')
-rw-r--r-- | Completion/Core/_prefix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Completion/Core/_prefix b/Completion/Core/_prefix index 18e6e3270..86fad12dc 100644 --- a/Completion/Core/_prefix +++ b/Completion/Core/_prefix @@ -5,7 +5,8 @@ [[ _matcher_num -gt 1 || -z "$SUFFIX" ]] && return 1 local comp curcontext="$curcontext" tmp \ - _completer _completer_num _matcher _matchers _matcher_num + _completer _completer_num \ + _matcher _c_matcher _matchers _matcher_num zstyle -a ":completion:${curcontext}:" completer comp || comp=( "${(@)_completers[1,_completer_num-1][(R)_prefix(|:*),-1]}" ) @@ -35,7 +36,14 @@ for tmp in "$comp[@]"; do _matchers=( '' ) _matcher_num=1 - for _matcher in "$_matchers[@]"; do + _matcher='' + for _c_matcher in "$_matchers[@]"; do + if [[ "$_c_matcher" == +* ]]; then + _matcher="$_matcher $_c_matcher[2,-1]" + else + _matcher="$_c_matcher" + fi + [[ "$tmp" != _prefix ]] && "$tmp" && return 0 (( _matcher_num++ )) done |