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

nosuchprogram 2> /dev/null



Sun 13:19:36 s3 yost /home/yost/mill/s3/personal/yost/bench
1 338 Z% nosuchprogram
zsh: command not found: nosuchprogram
Sun 13:20:21 s3 yost /home/yost/mill/s3/personal/yost/bench
127 339 Z% nosuchprogram 2> /dev/null
Sun 13:20:27 s3 yost /home/yost/mill/s3/personal/yost/bench
127 340 Z%

This command intends to redirect the output of nosuchcommand, but unintentionally, it is also redirecting the error output from zsh itself!

I think this behavior is wrong. I expected this:

Sun 13:19:36 s3 yost /home/yost/mill/s3/personal/yost/bench
1 338 Z% nosuchprogram 2> /dev/null
zsh: command not found: nosuchprogram
Sun 13:20:21 s3 yost /home/yost/mill/s3/personal/yost/bench
127 339 Z%

sh and bash act the same way.

This behavior is no doubt over 30 years old, so it would have to be changed under control of an option. I think there should be such an option.

Couldn't find anything about this anywhere within a reasonable amount of time searching.

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