Debian's which hunt
Debian's which hunt
Posted Oct 29, 2021 15:26 UTC (Fri) by marcH (subscriber, #57642)In reply to: Debian's which hunt by smoogen
Parent article: Debian's which hunt
Ignoring functions , built-in and aliases is really harmful. This has cost me a lot of time so I simply stopped using it. Problem solved.
Posted Oct 29, 2021 15:52 UTC (Fri)
by marcH (subscriber, #57642)
[Link]
- You should use "which" if you're still stuck with a C-shell for some reason
More C-shell history below
- I'm not saying "which" must be removed or deprecated or whatever (I don't care). But I am saying it is harmful for bash and other Bourne shell users and that they should stop using it for their own good.
Posted Oct 29, 2021 21:38 UTC (Fri)
by buck (subscriber, #55985)
[Link]
and, yes, count me in as one of the folks who never knew about the existence of `command` and had always resorted to `type -p` (and will continue to use it for my [occasional] purposes, which is in scripts and not interactive shells, when having `command -v` tell me about an alias isn't gonna work)
as for the matter somebody else raised about fetishizing POSIX, one only has to look at a `configure` script (maybe more so in the past than nowadays, as i guess checks for things like ULTRIX quirks may have gone by the wayside) to find plenty of reasons to be thankful for when an OS or distribution tries to take its cue from a formal or de-facto or what's-everybody-else-doing standard to reduce the heterogeneity when it doesn't add any meaningful value, ... if it's not already too well entrenched. and Linux itself got to be the dominant force it is by using (might-as-well-be) POSIX conformance as the calling card to present to get the door open, for it then to barge in and trample all the other guests
Debian's which hunt
$ tcsh
> which which
which: shell built-in command.
Debian's which hunt
