[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFD: Essential packages, /, and /usr



Branden Robinson <branden@debian.org> wrote:

>> I hate to break it to you but all the shells that could potentially
>> serve as /bin/sh in Debian provide type and test as builtins.  That
>> includes ash.

> And which(1)?

I do not see why we should use which.  As I have stated previously, we
already require feature sets (set -e in particular) in the new POSIX
document which imply the existence of type(1).  So type should be
the preferred utility for this task.  Besides, as an external utility,
which(1) does not know about shell builtins, which is actually bad.

Consider the hypothetical test:

if type foo; then
	foo ...
fi

Assuming that foo is implemented as a builtin in some shells other than
bash, then which(1) would fail to replace type(1) in this case since it
would only succeed had the external version of foo been installed.
-- 
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


-- 
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: