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

BUG: cd '' doesn't produce an error



Hello!

I recently discovered that zsh (versions 4.2.5 and 4.3.0-dev-1)
doesn't produce an error when i attempt to "cd ''" (in version 3.0.8 I
get the error i expected). Please let me know if you'd like me to test
any other versions.

Below is an example that demonstrates the problem, I was expecting an
error message and exit code from "cd ''" similar to what I get from
"cd flupp".

% mkdir /tmp/test
% cd /tmp/test
% pwd       
/tmp/test
% cd flupp
cd: no such file or directory: flupp
% echo $?
1
% pwd       
/tmp/test
% cd ''
% echo $?
0
% pwd
/tmp/test


Is this the bug I see or is it intended to be this way?

Some other shells I've tested:
bash 3.00.16(1)-release:   no error from cd ''
/bin/sh on SunOS 5.10:     expected behaviour
tcsh 6.14.00:              expected behaviour



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