Subject: Re: bin/3138: [dM] mkdep(1) always uses /usr/bin/gcc
To: None <netbsd-bugs@NetBSD.ORG>
From: Andrew Brown <codewarrior@daemon.org>
List: netbsd-bugs
Date: 02/07/1997 13:38:49
>> From: Todd Vierling
>
>On Wed, 5 Feb 1997, Mike Long wrote:
>
>: After thinking about your arguments I now agree with you that the
>: current behavior of /usr/bin/which is broken.  I still think Arne's C
>: program is overkill, however; something like:
>: 
>: #! /bin/csh -f
>: # ($NetBSD$, copyright, &c.)
>: which $*
>: 
>: should be sufficient.
>
>But try this, and hand it a name that isn't in $PATH.  It returns a big
>debug string instead of "" (null).

with the state of modern shells (zsh, bash, sh, ksh, tcsh, csh, etc...)
and the number of them that do things differently, i think you deserve
to lose if you're using a shell that does aliases (ala bash for example)
and then use /usr/bin/which.  all shells that have aliases (thereby
confuscating the path search as far as normal processing goes) should
all have a which builtin.  i believe most already do.  but for those
that don't have aliasing, a *BINARY* /usr/bin/which that just searches
using the PATH environment variable should be *fine*.  why isn't this
replaced?  why hasn't it been already (imho)?

-- 
|-----< "CODE WARRIOR" >-----|
andrew@echonyc.com (TheMan)        * "ah!  i see you have the internet
codewarrior@daemon.org                               that goes *ping*!"
warfare@graffiti.com      * "information is power -- share the wealth."