This is the mail archive of the
mailing list for the Cygwin project.
Re: $CDPATH bug in zsh
- From: "Peter A. Castro" <doctor at fruitbat dot org>
- To: cygwin at cygwin dot com
- Date: Wed, 5 Feb 2003 13:07:09 -0800 (PST)
- Subject: Re: $CDPATH bug in zsh
On Fri, 31 Jan 2003, Thorsten Kampe wrote:
> zsh doesn't evaluate the root directory ('/') if it is in $CDPATH. I
> tested this under SuSE 8.1 and it works as supposed, so this seems to
> be a Cygwin-zsh bug.
> Have a look at the example ('**' is my prompt).
Ok, I considder this a bug in zsh code, and I've created a patch to
special case root ("/"). It's really more of a clash with Windows path
methodology. See, Windows has this concept of drive share access where
you can access a host\share by specifying two leading slashes ("\\")
Or under cygwin:
Well, in the case of cdpath, it appends a slash ("/") to each of the
entries in cdpath and then appends the directory the user specified.
Thus for cdpath=/ and a "cd bin" you'd get "//bin". This is treated as a
partial host path and tries to cd to it which isn't valid. Try doing
"cd //bin" sometime. This works on Linux & Unix because there is no
special meaning attached to "//", but under Windows & Cygwin, there is.
So, I've coded a special case fix and I'll be releasing it soon.
As a work-around, specify "/." instead of "/" in cdpath and that will fix
(Administrator) ~/src/zsh/work406/work/zsh-4.0.6/Src % cdpath=(/. $HOME)
(Administrator) ~/src/zsh/work406/work/zsh-4.0.6/Src % cd bin
(Administrator) /bin %
Peter A. Castro <firstname.lastname@example.org> or <Peter.Castro@oracle.com>
"Cats are just autistic Dogs" -- Dr. Tony Attwood
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html