Hello

Could bash have some better handling of ENOENT for directories that don't exist and files that don't exist?

(B) is good, but (A) and (C) are problematic below.


$ bash --version
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)

A)
$ cd missingdir
bash: cd: missingdir: No such file or directory

B)
$ touch direct
$ cd direct
bash: cd: direct: Not a directory

Should not say a file, when "cd" command. Needs special handling

C)
$ ./main
-bash: ./main: No such file or directory


expected:


A)
$ cd missingdir
bash: cd: missingdir: No such directory

C)
$ ./main
-bash: ./main: No such file


Please keep my email address in any replies
Thanks
Jonny

Reply via email to