bug-bash
[Top][All Lists]
Advanced

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

Re: Behaviour of cd changed?


From: Chet Ramey
Subject: Re: Behaviour of cd changed?
Date: Tue, 24 Feb 2009 15:53:02 -0500
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Bernd Eggink wrote:
> I'm still having problems with the cd builtin. In bash 3, the commands
> 
>    cd
>    cd ""
> 
> both changed to the user's home directory. In bash 4 (with patch
> "save-current-token" applied)
> 
>    cd ""
> 
> does nothing. Bug or feature?

I get the same behavior from bash-3.2.48 and bash-4.0: canonicalizing ""
(since it's not an absolute pathname) results in $PWD, and the cd has no
effect.  If you run cd -P "" to avoid canonicalization, you get an error.
Make sure you're running `builtin cd' when you test to avoid the effect of
any function you've defined.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

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]