mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-23 17:01:05 +02:00
19309: add #q to the start of a glob qualifier in the -g argument
This commit is contained in:
parent
0167f8d036
commit
1b530bf152
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,10 @@ if (( $tmp[(I)-g*] )); then
|
||||||
glob="${${${${(@M)tmp:#-g*}#-g}##[[:blank:]]#}%%[[:blank:]]#}"
|
glob="${${${${(@M)tmp:#-g*}#-g}##[[:blank:]]#}%%[[:blank:]]#}"
|
||||||
[[ "$glob" = *[^\\][[:blank:]]* ]] &&
|
[[ "$glob" = *[^\\][[:blank:]]* ]] &&
|
||||||
glob="{${glob//(#b)([^\\])[[:blank:]]##/${match[1]},}}"
|
glob="{${glob//(#b)([^\\])[[:blank:]]##/${match[1]},}}"
|
||||||
|
|
||||||
|
# add `#q' to the beginning of any glob qualifier if not there already
|
||||||
|
[[ "$glob" = (#b)(*\()([^\|\~]##\)) && $match[2] != \#q* ]] &&
|
||||||
|
glob="${match[1]}#q${match[2]}"
|
||||||
fi
|
fi
|
||||||
tmp=$opts[(I)-F]
|
tmp=$opts[(I)-F]
|
||||||
if (( tmp )); then
|
if (( tmp )); then
|
||||||
|
|
Loading…
Reference in a new issue