Re: $CDPATH bug in zsh

2003-02-05 Thread Peter A. Castro
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 [EMAIL PROTECTED] or [EMAIL PROTECTED]
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/




Re: $CDPATH bug in zsh

2003-01-31 Thread Peter A. Castro
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).

Interesting...
Notice that if you replace / with the /cygdrive path to your root dir,
that it works:

(Administrator)[219] ~/src/zsh/work406/zsh-4.0.6 % cdpath=/cygdrive/e/cygwin
(Administrator)[220] ~/src/zsh/work406/zsh-4.0.6 % cd bin  
/cygdrive/e/cygwin/bin
(Administrator)[221] /cygdrive/e/cygwin/bin %  

It doesn't appear to be a mount-point issue.  If you set/add one of the
other mountpoints, like /usr/lib, you can cd to a subdir without any
trouble.  It appears to be just root (/).
I'll look into it.

 Thorsten

-- 
Peter A. Castro [EMAIL PROTECTED] or [EMAIL PROTECTED]
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/