Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [patch] "which"-builtin writes diagnostics to stdout
On Tue, 1 Sep 2015 16:16:30 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sep 1, 8:12am, Mikael Magnusson wrote:
> }
> } I guess the problem here is that in other shells, whence does not
> } exist, and which prints 'not found' to stderr.
>
> As far as I can tell, in other shells "which notacommand" prints NOTHING
> on stdout or stderr.
Another sidelight on zsh's behaviour illustrating the peculiarity of
this case...
% which true foo cat
true: shell built-in command
foo not found
/bin/cat
If "foo not found" went to stderr that would make the output overall a
bit of a mess; it's not clear there's a good argument for complicating
it like that. At least this looks to me like a good argument against
changing it.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author