From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25514 invoked by alias); 2 Sep 2015 08:53:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36397 Received: (qmail 1831 invoked from network); 2 Sep 2015 08:53:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f794b6d000001495-c7-55e6b900bc07 Date: Wed, 02 Sep 2015 09:53:17 +0100 From: Peter Stephenson To: Zsh hackers list Subject: Re: [patch] "which"-builtin writes diagnostics to stdout Message-id: <20150902095317.60d38ff0@pwslap01u.europe.root.pri> In-reply-to: <150901161630.ZM2441@torch.brasslantern.com> References: <20150830030614.GB18893@frozen.localdomain> <20150830052603.GE18893@frozen.localdomain> <150831230431.ZM894@torch.brasslantern.com> <150901161630.ZM2441@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKLMWRmVeSWpSXmKPExsVy+t/xa7oMO5+FGkyYoG5xsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mi60nGUv+Mda8f72FvYGxpssXYycHBICJhI3/u5lg7DFJC7c Ww9kc3EICSxllNje0ccK4cxgkvjWd5QJwtnKKLF2xQ12kBYWAVWJN7dWM4HYbAKGElM3zWYE sUUEtCR2nDwJFhcWcJSYc/Mp2ApeAXuJaT+OgdVwClhKXNveBTX0ApPEqumbwYbyC+hLXP37 iQniJnuJmVfOMEI0C0r8mHwP7G5moAWbtzWxQtjyEpvXvGUGsYUE1CVu3N3NPoFRaBaSlllI WmYhaVnAyLyKUTS1NLmgOCk910ivODG3uDQvXS85P3cTIyRwv+5gXHrM6hCjAAejEg9vQ+Kz UCHWxLLiytxDjBIczEoivKrbgUK8KYmVValF+fFFpTmpxYcYpTlYlMR5Z+56HyIkkJ5Ykpqd mlqQWgSTZeLglGpgNOsNWX6tgDWZe/nJoHKf6E8WG+8Gf481Zz/ft/i8xc61ViElYaWOhhO2 b7snumhD08SW+TPmtanHipu/3v/H++LcOaYHio/lJrkuWXm+qDmneDmr4LF5BxczBKc6N6u9 aiq+63Lt5pr8L2cXKqolvpLPuKh3fcPVSe9K1gRPip4c++1UZhSniBJLcUaioRZzUXEiAJ/Y YQJYAgAA On Tue, 1 Sep 2015 16:16:30 -0700 Bart Schaefer 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