From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19565 invoked from network); 5 May 2003 06:29:21 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 May 2003 06:29:21 -0000 Received: (qmail 22770 invoked by alias); 5 May 2003 06:29:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6068 Received: (qmail 22763 invoked from network); 5 May 2003 06:29:02 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 5 May 2003 06:29:02 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [192.35.17.28] by sunsite.dk (MessageWall 1.0.8) with SMTP; 5 May 2003 6:29:2 -0000 Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.11.7/8.11.7) with ESMTP id h456T1u22054; Mon, 5 May 2003 08:29:01 +0200 (MEST) Received: from MOWD019A.mow.siemens.ru ([163.242.196.119]) by mail2.siemens.de (8.11.7/8.11.7) with ESMTP id h456T1A03795; Mon, 5 May 2003 08:29:01 +0200 (MEST) Received: by mowd019a.mow.siemens.ru with Internet Mail Service (5.5.2653.19) id ; Mon, 5 May 2003 10:33:01 +0400 Received: from mw2b210c (163.242.193.12 [163.242.193.12]) by MOWD019A.mow.siemens.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id J908QFHP; Mon, 5 May 2003 10:33:00 +0400 From: Borzenkov Andrey To: "'Bill Burton'" , "'ZSH Users'" Subject: RE: Cygwin completion fails on mounted paths Date: Mon, 5 May 2003 10:28:53 +0400 Message-ID: <6134254DE87BD411908B00A0C99B044F05A0C912@mowd019a.mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 In-Reply-To: <3EB012AC.3000603@progress.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal > 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. >=20 > $ uname -a > CYGWIN_NT-5.1 nbbillb 1.3.20(0.73/3/2) 2003-02-08 12:10 i686 unknown > unknown Cygwin >=20 > 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) >=20 > If I try to complete on /c/, 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. >=20 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 /* [...] =20 > 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