summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-04-27 17:00:11 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-04-27 17:00:11 +0000
commit28bd1b02cfbb1f06dfbccfe7c4e2e935666ee209 (patch)
tree48f2178d6bc3397b06f71bd673c54b29a774bd0a /Completion/Unix
parentaa7003e0ca89881c693d9d5df1f5080d4ad9f570 (diff)
downloadzsh-28bd1b02cfbb1f06dfbccfe7c4e2e935666ee209.tar.gz
zsh-28bd1b02cfbb1f06dfbccfe7c4e2e935666ee209.tar.xz
zsh-28bd1b02cfbb1f06dfbccfe7c4e2e935666ee209.zip
19839, 19842: improve handling of #q in qualifiers
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Type/_path_files8
1 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index fc8edca02..aae248bf5 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -120,7 +120,9 @@ if zstyle -s ":completion:${curcontext}:" file-sort tmp1; then
 
     tmp2=()
     for tmp1 in "$pats[@]"; do
-      if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
+      if [[ "$tmp1" = (#b)(*[^\$])"(#q"(*)")" ]]; then
+	tmp2=( "$tmp2[@]" "${match[1]}(#q${sort}${match[2]})" )
+      elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
         tmp2=( "$tmp2[@]" "${match[1]}((${sort}${match[2][3,-1]}" )
       elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then
         tmp2=( "$tmp2[@]" "${match[1]}(${sort}${match[2][2,-1]}" )
@@ -168,7 +170,9 @@ if [[ -n "$compstate[pattern_match]" &&
   fi
   tmp2=()
   for tmp1 in "$pats[@]"; do
-    if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
+    if [[ "$tmp1" = (#b)(*[^\$])"(#q"(*)")" ]]; then
+      tmp2=( "$tmp2[@]" "${match[1]}(#q${tmp3}${match[2]})" )
+    elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
       tmp2=( "$tmp2[@]" "${match[1]}((${tmp3}${match[2][3,-1]}" )
     elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then
       tmp2=( "$tmp2[@]" "${match[1]}(${tmp3}${match[2][2,-1]}" )