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

RE: PATCH: files and paths and...



Andrej Borsenkow wrote:

> >   zstyle '*:files' fake '/:cygdrive' '/cygdrive:a b c...'
> >
> > Does that work?
> 
> Yes, but I personally prefer combination of
> 
> mw1g017@MW1G17C:/usr/build/zsh/Test% zstyle '*:files' accept-exact
> '/cygdrive/?((#e)|/*)'
> mw1g017@MW1G17C:/usr/build/zsh/Test% zstyle '*:files' fake /:cygdrive
> 
> to avoid listing all drives (that is the whole sense of using /cygdrive
> at all - else I could just mount them). It means, that we may complete
> non-existent drive - but there is really nothing to do about it unless
> some way to list all drives exist.
> 
> BTW as I found out, Cygwin allows you to use
> 
> <DRIVE>:/path/to/file
> 
> and even
> 
> d:\path\to\file (assuming proper quoting on shell level)
> 
> as well. E.g. d:/temp is completely valid. Currently Zsh cannot complete
> it:

Of course, it can. We only need someone who writes it.

Hm. I guess it understands that everywhere, yes? Not only in words
starting with `?:/'. Otherwise someone could write something in _first 
to call `_files -W ...' if the current word starts with that.

If it understand this in `-foo=d:/...', then we need support in
_path_files, but that would be possible (stuff it into prepath, etc
etc...). But only when on cygwin, of course, probably only if the
style support-cygwin(-s-rotten-paths-urgh) is set.

> ls d:/tTAB gives nothing. Sigh ... but probably we should move this
> discussion to zsh-users (to find out, just how useful it is at all).

Yes. The other stuff might be useful elsewhere. I've no idea how many
(poor) people (are forced to) use cygwin?


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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