diff options
| author | Oliver Kiddle <opk@zsh.org> | 2015-07-14 12:48:37 +0200 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2015-07-14 12:48:37 +0200 |
| commit | b230e6d11d78271f3fc2492b51ddf8f7c109b500 (patch) | |
| tree | 9ec600406cb1d940712f5d6cf53394349a10eb3b /Completion/Unix | |
| parent | 35790: zyodl.vim: Be compatible with Vim 6. (diff) | |
| download | zsh-b230e6d11d78271f3fc2492b51ddf8f7c109b500.tar zsh-b230e6d11d78271f3fc2492b51ddf8f7c109b500.tar.gz zsh-b230e6d11d78271f3fc2492b51ddf8f7c109b500.tar.bz2 zsh-b230e6d11d78271f3fc2492b51ddf8f7c109b500.tar.lz zsh-b230e6d11d78271f3fc2492b51ddf8f7c109b500.tar.xz zsh-b230e6d11d78271f3fc2492b51ddf8f7c109b500.tar.zst zsh-b230e6d11d78271f3fc2492b51ddf8f7c109b500.zip | |
35789: (tweaked c.f. Bart: 35791): duplicate glob qualifier handling from _path_files so it is called once and not for each file pattern
Diffstat (limited to 'Completion/Unix')
| -rw-r--r-- | Completion/Unix/Type/_files | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files index e628cb39e..a8ba9b3ce 100644 --- a/Completion/Unix/Type/_files +++ b/Completion/Unix/Type/_files @@ -1,6 +1,24 @@ #compdef -redirect-,-default-,-default- -local opts tmp glob pat pats expl tag i def descr end ign ret=1 match tried +local -a match mbegin mend +local ret=1 + +# Look for glob qualifiers. This is duplicated from _path_files because +# we don't want to complete them multiple times (for each file pattern). +if _have_glob_qual $PREFIX; then + compset -p ${#match[1]} + if [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\#'; then + _globflags && ret=0 + else + if [[ $_comp_caller_options[extendedglob] == on ]]; then + _describe -t globflags "glob flag" '(\#:introduce\ glob\ flag)' -Q -S '' && ret=0 + fi + _globquals && ret=0 + fi + return ret +fi + +local opts tmp glob pat pats expl tag i def descr end ign tried local type sdef ignvars ignvar prepath oprefix rfiles rfile zparseopts -a opts \ |
