Dear Pierre, I am afraid you didn't understand my problem. I think it is a bug. I am not trying to use CDPATH or prepend any directory to my destination. I am simply trying to go down a subdirectory and it won't go, despite the subdirectory being valid:
DrWho:~-> ls Desktop bin opera6.html work DrWho:~-> sh DrWho:~-> cd Desktop sh: cd: Desktop: No such file or directory DrWho:~-> cd ./Desktop DrWho:~/Desktop-> exit exit DrWho:~-> The problem with that is that I use CDPATH and it is a valid VARIABLE in bash. However, whenever I try to compile anything, make will use -sh and all Cds will fail unless they are declared fully. I am not expecting CDPATH to work with -sh. I am simply saying that "cd Desktop" should work with "any shell* - including sh (or bash's emulation of sh). According to me correct sh behavior would be in this case to ignore any inherited CDPATHs but keep cd functionality intact. 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: Eric Blake [mailto:[EMAIL PROTECTED] Sent: Monday, October 01, 2007 3:23 PM To: Pierre Gaston Cc: Valkanas Nikos; bug-bash@gnu.org Subject: Re: CDPATH bug -----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-----