1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-10 00:31:07 +02:00

43861: make "(#" completion safer by checking for ")"

This commit is contained in:
Peter Stephenson 2018-12-04 17:19:45 +00:00
parent 7f62255b49
commit 42020cdabb
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
2018-12-04 Peter Stephenson <p.stephenson@samsung.com>
* 43860: Completion/Unix/Type/_files: complete globbing flags at
start of word.
* 43860, 43861: Completion/Unix/Type/_files: complete globbing
flags at start of word.
2018-11-29 Peter Stephenson <p.stephenson@samsung.com>

View file

@ -17,7 +17,7 @@ if _have_glob_qual $PREFIX; then
_globquals && ret=0
fi
return ret
elif [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\(\#'; then
elif [[ $_comp_caller_options[extendedglob] == on && $PREFIX = \(\#[^\)]# ]] && compset -P '\(\#'; then
# Globbing flags can start at beginning of word, even though
# glob qualifiers can't.
_globflags && return