Zsh Mailing List Archive
Messages sorted by:
RE: File completion under Cygwin again
- X-seq: zsh-workers 12987
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: File completion under Cygwin again
- Date: Thu, 12 Oct 2000 17:00:46 +0400
- Importance: Normal
- In-reply-to: <200010121201.OAA30397@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> > 1. drive:/path completion.
> Use the fake-files style to offer `a:/' etc. Then use an
> implementation of _first that makes compset -P '?:/' and calls _files
> with -W. Does that work?
Mmm ... yes and no. It is simply too early. It will try to modify any word
that looks like x:/foo; and it needs to be done for "real" file names only.
I.e. in _path_files.
Anyway, adding (conditional) checking for ?:/ prefix is trivial (for anybody
who spent two years on _path_files at least :-). The question is - may it be
used for something else?
Is root-name style good enough? With implied usage
zstyle 'completion:*:paths' root-name '/ ?:/'
and implementation that basically sets donepath to root-name and strips it
> > 2. UNC path completion - //server/share/path - here actually subtopics
> > a) server name completion
> > b) share name completion
> > c) path completion
> I'm not exactly sure what this does, but maybe it could be done with
> some more fiddling with _first (I mean: completing the server names)?
The same as above. And could be implemented by
zstyle 'completion:*:paths' root-name '//server1/(share1|share2)/
And server/share names itself could already be completed with fake-files.
> > 4. Windows is using case-insensitive file system,
> Use the matcher style? (Not matcher-list.)
> > 5. (related to 4) things are complicated by the fact, that you can mount
> > case-sensitive file system (e.g. off SAMBA server),
> The matcher style with `zstyle -e'?
This is currently the best approximation. The only comment - this has to be
set for every tag that represents file names; users (and completion function
authors) are free to invent there own tags; and there is no ultimate tag list
currently (and cannot be).
I.e. again - it is property of file names, not particular completion context,
and logically should be implemented in _path_files. paths tag? Like for
> > 7. Backslash handling. So, that I do not forget it myself :-)
> I once said that this may be hard. But maybe it can be made simple:
> just convert all backslashes to slashes before completing >:->
Yes. For this reason I mentioned cygpath (that takes care of mount points as
Messages sorted by: