1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-13 11:21:13 +02:00

33137: _path_files: complete # to introduce a glob flag

This commit is contained in:
Mikael Magnusson 2013-05-18 11:24:49 +02:00
parent 78dd672e1a
commit cd09b81626
2 changed files with 18 additions and 7 deletions

View file

@ -3,6 +3,9 @@
* 33136: Doc/Zsh/expn.yo, Src/glob.c: P glob qualifier appends * 33136: Doc/Zsh/expn.yo, Src/glob.c: P glob qualifier appends
words when negated. words when negated.
* 33137: Completion/Unix/Type/_path_files: complete # to introduce
a glob flag
2014-09-14 Marc Finet <m.dreadlock@gmail.com> 2014-09-14 Marc Finet <m.dreadlock@gmail.com>
* 33149: Misc/vcs_info-examples: vcs_info examples: fix typo * 33149: Misc/vcs_info-examples: vcs_info examples: fix typo

View file

@ -15,13 +15,21 @@ local -a match mbegin mend
# a bare glob qualifier. # a bare glob qualifier.
# The later test looks for an outstanding quote. # The later test looks for an outstanding quote.
if _have_glob_qual $PREFIX; then if _have_glob_qual $PREFIX; then
compset -p ${#match[1]} local ret=1
if [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\#'; then compset -p ${#match[1]}
_globflags if [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\#'; then
else _globflags && ret=0
_globquals else
fi if [[ $_comp_caller_options[extendedglob] == on ]]; then
return local -a flags
flags=(
'#:introduce glob flag'
)
_describe -t globflags "glob flag" flags -Q -S '' && ret=0
fi
_globquals && ret=0
fi
return ret
fi fi
# Utility function for in-path completion. This allows `/u/l/b<TAB>' # Utility function for in-path completion. This allows `/u/l/b<TAB>'