bug-gnu-utils
[Top][All Lists]
Advanced

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

which(1) manpage improvement suggestion: mention type vs. which


From: Dan Jacobson
Subject: which(1) manpage improvement suggestion: mention type vs. which
Date: 28 Mar 2001 11:47:23 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

[Was: Re: bash needs builtin 'which' command]

>>>>> "Paul" == Paul Jarc <address@hidden> writes:

Paul> Dan Jacobson <address@hidden> writes:
>> $ which true
>> /bin/true
>> but that's not what gets called by
>> $ true
>> etc. etc.

Paul> "which foo" isn't supposed to tell you what "foo" is; that's what
Paul> "type foo" is for.  "which foo" does exactly what it's supposed to do:
Paul> it tells you where foo is in $PATH.  If that isn't the information
Paul> you're looking for, simply don't use "which".

>> It seems that the only way to get 'which' to know about bash
>> builtins is to make it a builtin itself [in addition to, not
>> replacement for, /usr/bin/which, etc.]

Paul> Right.  But "which" isn't supposed to know about builtins.

>> That seems to be the right way to get it to give the correct answer

Paul> The correct answer depends on the question.  "which" answers one
Paul> question correctly, and another one incorrectly.  So it's best to ask
Paul> it the first question, but not the second.

Hmmm, maybe the which man page should mention this, so I wouldn't make
a fool of myself next time I forget it and complain again.
-- 
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]