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

Re: Future of /usr/bin/which in Debian?

The Wanderer <wanderer@fastmail.fm> writes:
> On 2021-09-21 at 16:16, Michael Stone wrote:

>> I think it doesn't matter how many which implementations are in
>> debian. If you want something with specific portable semantics, just
>> use command -v.

> I think I've seen that suggested a lot as an alternative for 'which',
> but it doesn't seem to be comparably reliable in all contexts.

I don't think the point is that command -v is a drop-in replacement for
which (it definitely is not).  I think the point is that command -v is a
standardized, portable interface.  If you want portable semantics, the
standardized command is command -v, but it doesn't do quite the same thing
in quite the same way.  If you want which, you have to live with the fact
that it's not portable and different which implementations behave in
different ways.

Russ Allbery (rra@debian.org)              <https://www.eyrie.org/~eagle/>

Reply to: