Egmont Koblinger wrote: > However, if bash is launched as "sh", the "pwd -P" command alters $PWD to > the resolved canonical full path name, and if the prompt contains \w, it is > also updated to the canonical value. Example: [...] > Either it's a bug, or the docs forget to mention that "pwd -P" alters $PWD > if in "sh" mode.
POSIX requires it (from http://www.opengroup.org/onlinepubs/009695399/utilities/pwd.html): "PWD If the -P option is in effect, this variable shall be set to an absolute pathname of the current working directory that does not contain any components that specify symbolic links, does not contain any components that are dot, and does not contain any components that are dot-dot. If an application sets or unsets the value of PWD , the behavior of pwd is unspecified." The section on posix mode in the bash texinfo manual documents it: "When the @code{pwd} builtin is supplied the @option{-P} option, it resets @code{$PWD} to a pathname containing no symlinks." There's no posix mode section in the manual page. (Though maybe there should be -- at the current length, what's a couple of more pages?) Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash