Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: file-sort in _path_files



This seems to fix the bug I just reported; there may be a more elegant
way -- such as, simply inserting a new (#q...) in the right place -- but
I wasn't sure what ramifications that might have for the "copy qualifiers
from the line" section that creates $tmp3 (just above the patched lines).
More patching may still be needed for that portion.

Index: Completion/Unix/Type/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v
retrieving revision 1.23
diff -u -r1.23 _path_files
--- Completion/Unix/Type/_path_files	8 May 2003 10:30:49 -0000	1.23
+++ Completion/Unix/Type/_path_files	27 Apr 2004 15:21:47 -0000
@@ -120,10 +120,10 @@
 
     tmp2=()
     for tmp1 in "$pats[@]"; do
-      if [[ "$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]}" )
+      if [[ "$tmp1" = (#b)(*[^\$])\(\((\#q)#(([^\|~])##\)\)) ]]; then
+        tmp2=( "$tmp2[@]" "${match[1]}((${sort}${match[3]}" )
+      elif [[ "$tmp1" = (#b)(*[^\$])\((\#q)#(([^\|~])##\)) ]]; then
+        tmp2=( "$tmp2[@]" "${match[1]}(${sort}${match[3]}" )
       else
         tmp2=( "$tmp2[@]" "${tmp1}(${sort})" )
       fi




Messages sorted by: Reverse Date, Date, Thread, Author