bug-bash
[Top][All Lists]
Advanced

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

Re: Behaviour of cd changed?


From: Bernd Eggink
Subject: Re: Behaviour of cd changed?
Date: Tue, 24 Feb 2009 23:00:31 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081209)

Chet Ramey schrieb:
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.

Sorry, my mistake. In a moment of mental absence I had changed
        builtin cd "@"
to
        builtin cd "*"
This caused the change in behaviour and is wrong, of course.

Regards,
Bernd

--
Bernd Eggink
http://sudrala.de





reply via email to

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