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

Re: RE: Preserve initial // in path name completion

Andrej Borsenkow wrote:

> ...
> To my immense surprise even with preserve-prefix unset (but with your patch
> and suitably set fake-files) and squeeze-slashes it happily completed inside
> UNC paths, even respecting all matchers. Looks, like fake-files win?

Err... the patch shouldn't make a difference with the style set, does it
work without the patch, too? (And with the patch below.)

> ...
> This obviously happens only with root$; any other share I've tried works.

This was a more general problem because the test for parameter
expansions in the string to complete didn't check if the `$' was
preceded by a backslash.  Fix below.  I'll commit it (to the stable
branch, too).


Index: Completion/Unix/Type/_path_files
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v
retrieving revision 1.6
diff -u -r1.6 _path_files
--- Completion/Unix/Type/_path_files	2001/06/18 09:53:17	1.6
+++ Completion/Unix/Type/_path_files	2001/07/06 10:40:04
@@ -190,7 +190,7 @@
 # Now let's have a closer look at the string to complete.
-if [[ "$pre" = [^][*?#^\|\<\>]#(\`[^\`]#\`|\$)*/* && "$compstate[quote]" != \' ]]; then
+if [[ "$pre" = [^][*?#^\|\<\>\\]#(\`[^\`]#\`|\$)*/* && "$compstate[quote]" != \' ]]; then
   # If there is a parameter expansion in the word from the line, we try
   # to complete the beast by expanding the prefix and completing anything

Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

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