delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/05/16:08:36

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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" <doctor AT fruitbat DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: $CDPATH bug in zsh
In-Reply-To: <e2jc19mzh1a.dlg@thorstenkampe.de>
Message-ID: <Pine.LNX.4.21.0302050955300.3132-100000@gremlin.fruitbat.org>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019