1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

38707: strip suffix for glob qualifier completion

This commit is contained in:
Oliver Kiddle 2016-06-18 00:15:11 +02:00
parent bce43df70d
commit 2f67cd514f
4 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,9 @@
2016-06-18 Oliver Kiddle <opk@zsh.org>
* 38707: Completion/Zsh/Type/_globquals,
Completion/Unix/Type/_files, Completion/Unix/Type/_path_files:
strip suffix for glob qualifier completion
* 38703: Completion/Unix/Command/_su: support su options on macOS
2016-06-16 Peter Stephenson <p.stephenson@samsung.com>

View file

@ -7,6 +7,7 @@ local ret=1
# we don't want to complete them multiple times (for each file pattern).
if _have_glob_qual $PREFIX; then
compset -p ${#match[1]}
compset -S '[^\)\|\~]#(|\))'
if [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\#'; then
_globflags && ret=0
else

View file

@ -17,6 +17,7 @@ local -a match mbegin mend
if _have_glob_qual $PREFIX; then
local ret=1
compset -p ${#match[1]}
compset -S '[^\)\|\~]#(|\))'
if [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\#'; then
_globflags && ret=0
else

View file

@ -125,7 +125,7 @@ while [[ -n $PREFIX ]]; do
alts+=("senses:sense:compadd -E 0 -d sdisp -S '' - + '' -")
fi
specmap=( M months w weeks h hours m minutes s seconds '(|+|-|d)' days)
alts+=('digits:digit ('${${specmap[(K)$timespec]}:-invalid time specifier}'):_dates -f ${${timespec/[-+]/d}:-d} -S ""' )
alts+=('digits:digit ('${${specmap[(K)${timespec:-d}]}:-invalid time specifier}'):_dates -f ${${timespec/[-+]/d}:-d} -S ""' )
_alternative $alts
return
fi