From 1b530bf152e1ca8c9c135c58a4753899d68db8e4 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 21 Jan 2004 13:50:31 +0000 Subject: 19309: add #q to the start of a glob qualifier in the -g argument --- Completion/Unix/Type/_files | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files index d9d278fa3..a3545cb54 100644 --- a/Completion/Unix/Type/_files +++ b/Completion/Unix/Type/_files @@ -11,6 +11,10 @@ if (( $tmp[(I)-g*] )); then glob="${${${${(@M)tmp:#-g*}#-g}##[[:blank:]]#}%%[[:blank:]]#}" [[ "$glob" = *[^\\][[:blank:]]* ]] && 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 tmp=$opts[(I)-F] if (( tmp )); then -- cgit 1.4.1