1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-30 05:40:58 +01: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

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