zsh-users
 help / color / mirror / code / Atom feed
* Cygwin completion fails on mounted paths
@ 2003-04-30 18:15 Bill Burton
  2003-05-05  6:28 ` Borzenkov Andrey
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Burton @ 2003-04-30 18:15 UTC (permalink / raw)
  To: ZSH Users

Hello,

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.

The following hack seems to work.  First in My Computer, Environment 
variables, I created a CYGWIN_HOME User variable set to 
/cygdrive/c/home.  Then, I modified /etc/zprofile adding the following 
after the USER="`id -un`" line:

# Get a specfic home directory
if [ -n "$CYGWIN_HOME" ]; then
   if [ -d "$CYGWIN_HOME" ]; then
     HOME="$CYGWIN_HOME"
   else
     echo "CYGWIN_HOME points to a non existant directory!"
   fi
fi

Then, I created a zygwin.bat script in my Cygwin root directory C:\cygwin:
   @echo off
   C:
   chdir C:\cygwin\bin
   zsh -l -i

So, I guess there's a bug in the completion and/or the way HOME is handled.

-Bill



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-05  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-30 18:15 Cygwin completion fails on mounted paths Bill Burton
2003-05-05  6:28 ` Borzenkov Andrey

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).