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

Re: BUG: Shell builtin `which` prints non-existent commands to stdout



On Mon, 24 Sep 2018 11:22:18 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Mon, 24 Sep 2018 10:00:31 +0200
> Klaus Alexander Seistrup <klaus@xxxxxxxxxxx> wrote:
> > TL;DR: When `which` does not find a command it prints the error to 
> > standard output instead of standard error. Exit code is set correctly, 
> > though, and error messages about ‘bad options’ are sent to standard 
> > error as expected.  
> 
> This is not a bug and has been discussed numerous times, e.g. the thread
> that starts at.
> 
> http://www.zsh.org/mla/workers//2015/msg02253.html
> 
> (official zsh-workers message number 36330).
> 
> We definitely don't wish to change this now.

(Having said that, I don't really care about things pushed
behind POSIX_BUILTINS...  Despite previous suggestions, I don't
think changing default zsh behaviour at this stage is the right
way out.  I buy Bart's argument that expecting which to have
no output is a bit weird.)

pws





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