bug-bash
[Top][All Lists]
Advanced

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

Re: CDPATH bug


From: Pierre Gaston
Subject: Re: CDPATH bug
Date: Mon, 1 Oct 2007 15:02:37 +0300

On 10/1/07, Valkanas Nikos <Nikos.Valkanas@xt.hol.net> wrote:
>
> The strange thing is that sh is just a link to bash, and starting a bash
> subshell works fine.
>
This is because :

"If bash is  invoked with the name sh, it  tries to mimic the
startup behavior of historical  versions of sh as closely as
possible, while  conforming to  the POSIX standard  as well".

from http://www.gnu.org/software/bash/manual/bashref.html#SEC85

19. If `CDPATH' is set, the `cd' builtin will not implicitly append
     the current directory to it.  This means that `cd' will fail if no
     valid directory name can be constructed from any of the entries in
     `$CDPATH', even if the a directory with the same name as the name
     given as an argument to `cd' exists in the current directory.

Pierre




reply via email to

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