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 11:23:15 +0300

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?

Even if one would argue that CDPATH should not be set in sh, normal
shell behaviour dictates to ignore any variables it doesn't handle.
Handling a variable it shouldn't is one mistake. Handling it wrongly is
a second one.

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: Chet Ramey [mailto:chet.ramey@case.edu] 
Sent: Tuesday, October 02, 2007 5:04 AM
To: Pierre Gaston
Cc: Valkanas Nikos; bug-bash@gnu.org
Subject: Re: CDPATH bug

Pierre Gaston wrote:

> I think I did, if bash is invoked as sh, it behaves differently, one
> of these differences is that
> cd will not try to search in you current directory.
> as soon as CDPATH is set, "cd Desktop" will only work if Desktop is in
a subdir
> of the directories defined in CDPATH and will fail even if Desktop is
> in your current dir.
> 
> This behaviour is documented in the reference guide read again my
first mail.
> 
> It seems that  this  documented behaviour is a "bug" because POSIX
> doesn't define it this way. I tend to agree with Erik on this point.

I have not made up my mind about it.  The bash behavior when invoked
as `sh' (or in posix mode) is the historical sh behavior, and is what
other shells claiming posix compliance (ksh93, dash) or as close as
you can get to a straight-line descendant of the bourne shell (SVR2
sh, SVR3 sh, SVR4.2 sh) do.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu
http://cnswww.cns.cwru.edu/~chet/




reply via email to

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