From: Borzenkov Andrey <Andrey.Borzenkov@siemens.com>
To: "'Bill Burton'" <billb@progress.com>,
"'ZSH Users'" <zsh-users@sunsite.dk>
Subject: RE: Cygwin completion fails on mounted paths
Date: Mon, 5 May 2003 10:28:53 +0400 [thread overview]
Message-ID: <6134254DE87BD411908B00A0C99B044F05A0C912@mowd019a.mow.siemens.ru> (raw)
In-Reply-To: <3EB012AC.3000603@progress.com>
> I found the discussion earlier this month "ZSH DOS/Windows" rather
> informative. This got me looking at some problems I've had using zsh as
> my default shell under Cygwin. This is zsh 4.0.6 installed from a
> recent Cygwin setup.
>
> $ uname -a
> CYGWIN_NT-5.1 nbbillb 1.3.20(0.73/3/2) 2003-02-08 12:10 i686 unknown
> unknown Cygwin
>
> The problem I'm having is that zsh refuses to complete on mounted paths:
> $ mount
> C:\cygwin\bin on /usr/bin type system (binmode)
> C:\cygwin\lib on /usr/lib type system (binmode)
> C:\cygwin on / type system (binmode)
> C: on /c type system (textmode)
>
> If I try to complete on /c/<C-D>, zsh just barks at me. After some
> experimentation, I found the work around is to *not* set HOME to
> something that uses a mount. But I want my HOME in a different place
> than the default that's based on HOMEDRIVE and HOMEPATH.
>
that is not strictly speaking Zsh fault. Zsh is using globbing when
completing file names and globbing does not return Cygwin mount points. Just
try
cd /
echo *
or simply
echo /*
[...]
> So, I guess there's a bug in the completion and/or the way HOME is
> handled.
>
The bug is in the way Cygwin treats own mount points. Zsh has workaround for
it:
fake-files
This style is used when completing files and looked up without a
tag. Its values are of the form `DIR:NAMES...'. This will add
the NAMES (strings separated by spaces) as possible matches when
completing in the directory DIR, even if no such files really
exist.
This can be useful on systems that support special filesystems
whose top-level pathnames can not be listed or generated with glob
patterns. It can also be used for directories for which one does
not have read permission.
So set it to
zstyle ':completeion:*:fake-files' /:'c d cygroot' /cygroot:'c d ...' ...
etc
(IIRC virtual root is called /cygroot).
If you come up with a script that parses mount table and automatically
creates this style we can add it to distribution so whoever packages Zsh for
Cygwin could use it in /etc/zshrc by default. I once intended to do it but I
do not use Cygwin now.
-andrey
prev parent reply other threads:[~2003-05-05 6:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-30 18:15 Bill Burton
2003-05-05 6:28 ` Borzenkov Andrey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6134254DE87BD411908B00A0C99B044F05A0C912@mowd019a.mow.siemens.ru \
--to=andrey.borzenkov@siemens.com \
--cc=billb@progress.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).