Mail Archives: cygwin/2003/02/05/16:08:36
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[1] ('**' 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 ("\\")
thus:
dir \\ming\archive
Or under cygwin:
ls //ming/archive
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
it to.
(Administrator)[112] ~/src/zsh/work406/work/zsh-4.0.6/Src % cdpath=(/. $HOME)
(Administrator)[113] ~/src/zsh/work406/work/zsh-4.0.6/Src % cd bin
/bin ~/src/zsh/work406/work/zsh-4.0.6/Src
(Administrator)[113] /bin %
> Thorsten
--
Peter A. Castro <doctor AT fruitbat DOT org> or <Peter DOT Castro AT oracle DOT com>
"Cats are just autistic Dogs" -- Dr. Tony Attwood
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -