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

RE: Preserve initial // in path name completion

> Currently not.  Seems like we never came aroud to implementing it, but
> it can be made quite simply, see the patch below.  It adds a style
> `preserve-prefix' which can be given a pattern and _path_files will then
> blindly keep any prefix matched by that pattern unchanged.

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?

> Would that be enough?

I do not quite understand but may be it even is not needed? Anyway, the only
problem. I have \\itsrm2\root$. I defined

zstyle ':completion:*' fake-files //:itsrm2 //itsrm2:root\$
zstyle ':completion:*' squeeze-slashes true


(tty1)% l //i/r/t/s/zTAB
(tty1)% l //itsrm2/root\$/tools/share/z
Completing files
share/  src/
(tty1)% l //itsrm2/root\$/tools/src/zTAB
No matches for: `files' or `file'

I *do* have /tools/src/zsh:

(tty1)% l //i/r/t/s/z/s/mTAB
(tty1)% l //itsrm2/root\$/tools/src/zsh/s/m
Completing files
zsh/        zsh-4.0.x/

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


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