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

PATCH: _path_files -W absolute-pathname



zdump <TAB> completes files under a root directory as:

Z:akr@thorax% zdump <TAB>
timezone
bin/         etc/         lib/         proc/        usr/                    
boot/        floppy/      lost+found/  root/        var/                    
cdrom/       home/        mnt/         sbin/        vmlinuz@                
dev/         initrd/      net/         tmp/         vmlinuz-@               

Index: Completion/Core/_path_files
===================================================================
RCS file: /projects/zsh/zsh/Completion/Core/_path_files,v
retrieving revision 1.1.1.51
diff -u -r1.1.1.51 _path_files
--- Completion/Core/_path_files	2000/01/04 15:02:25	1.1.1.51
+++ Completion/Core/_path_files	2000/01/05 23:45:15
@@ -43,6 +43,8 @@
   W)     tmp1="$OPTARG"
          if [[ "$tmp1[1]" = '(' ]]; then
            prepaths=( ${^=tmp1[2,-2]%/}/ )
+	 elif [[ "$tmp1[1]" = '/' ]]; then
+           prepaths=( "$tmp1/" )
          else
 	   # In this case the variable should be an array, so
 	   # don't use an extra ${=...}.
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /projects/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.1.1.107
diff -u -r1.1.1.107 compsys.yo
--- Doc/Zsh/compsys.yo	2000/01/05 15:00:22	1.1.1.107
+++ Doc/Zsh/compsys.yo	2000/01/05 23:45:16
@@ -1844,7 +1844,8 @@
 prefixes that are to be prepended to the string from the line to
 generate the filenames but that should not be inserted in the line or
 shown in a completion listing. The var(paths) may be the name of an
-array parameter or a literal list of paths enclosed in parentheses.
+array parameter, a literal list of paths enclosed in parentheses or
+an absolute pathname.
 Additionally, the `tt(-F)'
 option from the tt(compadd) builtin is supported, giving direct control
 over which filenames should be ignored. If no such option is given,
-- 
Tanaka Akira



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