Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 5 Feb 2003 13:07:09 -0800 (PST) From: "Peter A. Castro" To: cygwin AT cygwin DOT com Subject: Re: $CDPATH bug in zsh In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 or "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/