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

Re: [Bug] Builtin "which" prints errors to stdout instead of stderr



"Laurent, Jean-Baptiste" wrote:
>
> Zsh 5.3.1 error message < XXX not found > is printed to stdout instead of stderr.
> Zsh 5.3.1 - 0 #> which ccache
> ccache not found
> Zsh 5.3.1 - 1 #> which ccache 2> /dev/null
> Zsh 5.3.1 - 2 #> which which

I believe this is actually intentional for compatibility with csh. It is
arguably not an error but informational. This last came up in workers/38747.

The which external was traditionally a C-shell script. Still is on
Solaris. Recent Linux has it as a binary and does send it to stderr. On
FreeBSD, it is silent.

If this keeps coming up, perhaps it'd be easier just to change it.

Oliver



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