Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: files and paths and...
- X-seq: zsh-workers 11983
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Sven Wischnowsky" <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: PATCH: files and paths and...
- Date: Mon, 19 Jun 2000 16:46:36 +0400
- Importance: Normal
- In-reply-to: <200006190929.LAA21068@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
> 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:
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). One
way is to use cygpath utility that converts between DOS/Unix:
mw1g017@MW1G17C:/usr/build/zsh/Test% cygpath
Usage: cygpath [-p|--path] (-u|--unix)|(-w|--windows) filename
-a|--absolute output absolute path
-c|--close handle close handle (for use in captured process)
-f|--file file read file for path information
-u|--unix print Unix form of filename
-w|--windows print Windows form of filename
-W|--windir print `Windows' directory
-S|--sysdir print `system' directory
-p|--path filename argument is a path
mw1g017@MW1G17C:/usr/build/zsh/Test% cygpath -u d:/temp
/cygdrive/d/temp
mw1g017@MW1G17C:/usr/build/zsh/Test% cygpath -u d:\\temp
/cygdrive/d/temp
mw1g017@MW1G17C:/usr/build/zsh/Test% cygpath -w /usr
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author