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

`cd .` in non-existent directory leads into weird corner case



Hi all,

maybe I am misunderstanding zsh's intentions here, but this behaviour
seems to be quite useless/counter-intuitive and potentially harmful:

richih@adamantium  ~ % zsh -f
adamantium% PS1="%~ %# "
~ % mkdir testdir
~ % cd testdir
~/testdir % rmdir ~/testdir
~/testdir % cd .
. % ls
. % pwd
.
. % cd ..
. % pwd
.
. %

Wouldn't it be better if zsh threw an error as soon as the user tries to `cd .`?


Thanks,
Richard



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