bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: CDPATH bug


From: Valkanas Nikos
Subject: RE: CDPATH bug
Date: Tue, 2 Oct 2007 12:03:34 +0300

You are right. I am starting to think that /bin/sh implementation is
correct and bash implementation is too permissive. If I set CDPATH:

export CDPATH=".:~/work:~/work/HOL"

everything will work correctly with all shells, and be much more
analogous to PATH. However, the analogy to PATH should not be exact.
PATH will not work with an empty PATH, whereas cd should work with empty
CDPATH. Maybe bash should be aligned to the other shells (i.e. no cd to
a subdir unless "." is part of CDPATH, or CDPATH is not set)

Regards

Nikos Valkanas 
Billing Services 
Technology & Operations 

Tel:     +30 213 000 4087       

hellas online 
Adrianiou 2, 11525 Athens, www.hol.gr 

  

IMPORTANT NOTICE: This email and any of its attachments and information
contained herein are intended only for the recipient(s) named above and
are privileged, confidential, protected by law and/or contain trade
secrets. Any unauthorized use, e.g. review, printing, copying or
distribution by other persons, is prohibited and may constitute a
criminal offence. hellas online cannot accept any responsibility for the
accuracy or completeness of this message as it may have been transmitted
over a public network. 

 

P Please consider your environmental responsibility before printing this
e-mail 

-----Original Message-----
From: Pierre Gaston [mailto:pierre.gaston@gmail.com] 
Sent: Tuesday, October 02, 2007 11:37 AM
To: Valkanas Nikos
Cc: bug-bash@gnu.org
Subject: Re: CDPATH bug

On 10/2/07, Valkanas Nikos <Nikos.Valkanas@xt.hol.net> wrote:
> Sorry for butting in. Considering that "Desktop" is a valid subdir is
it
> normal behavior in *any* shell to get:
>
> DrWho:~-> cd Desktop
> sh: cd: Desktop: No such file or directory
>
> Which shell behaves like that?

Chet Ramey listed some in his mail, I've tried:

ash,  ksh93 and pdksh when invoked with the name "sh", /bin/sh and
/usr/xpg4/bin/sh under sunOS 5.8

They all behave like bash when started with the name "sh"

> Even if one would argue that CDPATH should not be set in sh

CDPATH is documented in sh, so there is no reason not to use it,  but
so far the only "sh"  I found that cd to a subdir in the current path
when CDPATH is set  is  zsh when started with the name "sh".




reply via email to

[Prev in Thread] Current Thread [Next in Thread]