Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug with $PWD in /



On Sep 16,  1:37pm, Bart Schaefer wrote:
}
} Curious that this only occurs when the real directory is the root.

Ah.  Zsh ignores the environment PWD unless it already points to the
actual current directory.  Since, in the root, .. and . and any path
containing nothing but those all loop back to the current directory,
zsh accepts the value.

Hence also PWD="../$(basename $PWD)" will be accepted anywhere.  This
also seems to be the rule bash is following.



Messages sorted by: Reverse Date, Date, Thread, Author