-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Pierre Gaston on 10/1/2007 6:02 AM: > 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.
Which is a bug in bash, because POSIX requires cd to behave as though CDPATH implicitly ended with a directive for `.'. http://www.opengroup.org/onlinepubs/009695399/utilities/cd.html (also read the amended instructions at http://www.opengroup.org/austin/interps/uploads/40/6230/AI-037.txt) step 5 deals with CDPATH, and states: "repeat this step with the next pathname in CDPATH until all pathnames have been tested." at which point, if CDPATH did not find a solution, the implementation MUST move on to step 6: "Set curpath to the string formed by the concatenation of the value of PWD, a slash character, and the operand." - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHAOZ784KuGfSFAYARAhi6AJ9CQjwsvQalQOyfSICXm8R7rxwlWQCg14Zm Ct0zY1qcET5LbrQsDB6wTHY= =9F2W -----END PGP SIGNATURE-----