Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 1 Apr 2004, Perry E. Metzger wrote:
>
>Bill Studenmund <wrstuden%netbsd.org@localhost> writes:
>> So the decision was that it would be better to remove this command rather
>> than leave it in in such a broken form.
>
>Solaris has which.
>All versions of linux I've just checked have which
>FreeBSD has which
>OpenBSD has which
>
>So, to a good approximation, we are now the only Unix without the
>command.
We provide `which' as a shell built in for the only shell for which it's
output has any useful meaning. If you want similar behavior for another
shell, _surely_ you will not find it very hard to alias that shell's
equivalent command (i.e. `type' in sh, ksh, or bash) to which, now will
you?
At any rate, an external `which' which tells a user what command would
be found by a shell which they are definitionally not using (as they
didn't get the builtin) is of _extremely_ limited usefulness, and
violates the principal of least surprise in _any_ case.
And if you believe that an external program which necessarily cannot
know about aliases, shell functions, and similar cases is something you
simply must have, well, whereis is in /usr/bin, and is implemented in c.
You can always alias that to `which' if you find that `type' is giving
you the correct answer too much of the time...
- --
Jim Wise
jwise%draga.com@localhost
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iD4DBQFAbH/ERxzMSZ/9vAMRAuEnAJdG5A/YIs5VFSLZX+Ao316qlTnaAJ4iZ2+m
lcjBWX9qyKu7Jpd/O+xFEw==
=xZ6B
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index