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

Fix for _path_files



I just noticed that the quoting of the line-string in _path_files made 
completion of strings starting with `~' fail. The tilde was quoted,
too (of course). The second hunk puts a `$line' in the place where it
is needed, I guess that this stopped working when I changed the names
of the locals.

Bye
 Sven

--- of/Completion/_path_files	Mon Feb 22 12:01:45 1999
+++ Functions/Completion/_path_files	Mon Feb 22 16:31:41 1999
@@ -56,6 +56,11 @@
 
 str="${PREFIX:q}*${SUFFIX:q}"
 
+# If the string began with a `~', the quoting turned this into `\~',
+# remove the slash.
+
+[[ "$str" = \\\~* ]] && str="$str[2,-1]"
+
 # We will first try normal completion called with `complist', but only if we
 # weren't given a `-F' option.
 
@@ -109,7 +114,7 @@
   # prefix path by setting `prepaths'.
   
   linepath="${str%%/*}/"
-  eval realpath\=path
+  eval realpath\=$linepath
   str="${str#*/}"
   donepath=''
   prepaths=( '' )

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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