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

RE: Completions under NT / cygwin



> An alternative to Andrej's suggestion which I have used is to use
> something like:
>
> for drive in a b c d k p r; hash -d $drive=/cygdrive/$drive
>
> in .zshrc. Then you can refer to other drives with, for example ~c/
> Completion after that works fine (unless it requires something else in
> my setup).
>
> For some reason if you omit the hash -d and just set the variable, i.e.
> for d in a b c; $d=/cygdrive/$d
> I get error messages like this:
> /home/administrator/.zshrc:48: no such file or directory: r=/cygdrive/r
> Note that this is a fairly old version of zsh so this might be fixed by
> now - I only rarely use cygwin.
>

I doubt that. /cygdrive/r is pure virtual "directory" which means, any normal
file operation on it fails. Zsh probably tries to stat it.

fake-files was invented exactly to allow /cygdrive/x completion under cygwin.
It works nicely. Note, that it will work in *any* context where filename is
expected.

-andrej



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