1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-26 16:40:29 +01:00

35789: (tweaked c.f. Bart: 35791): duplicate glob qualifier handling from _path_files so it is called once and not for each file pattern

This commit is contained in:
Oliver Kiddle 2015-07-14 12:48:37 +02:00
parent 40a6f1d347
commit b230e6d11d
2 changed files with 25 additions and 1 deletions

View file

@ -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 \