Hacker News new | ask | show | jobs
by asveikau 1216 days ago
Quoted by the lwn article:

> "surely no one competent would choose to have a package depend on `which` when a standard POSIX utility can do a better job".

This is one of the most ridiculous takes I've heard and severely out of touch with shell scripts out in the wild, to say nothing of the expectations of Unix users typing at an interactive shell.

First time I used Debian was '99 or 2000. It's been a go-to Linux distro for me for a long time. This is disappointing.

1 comments

I stopped using which some time ago because while it worked fine to bootstrap Debian based distros I found out it wasn't included in arch. Since then I always default to command -v. I don't see the problem, it already wasn't portable and as can be seen in this thread including it gives the false impression that it was.
My house has machines running FreeBSD, OpenBSD, Linux, Mac, and lastly some old '90s Unix I never power on. Those all have which.

The only portability wrinkle I've personally seen is that old Solaris behaved differently when the program isn't found. It would say "no $1 in $PATH" to stdout, whereas more recent systems just don't display anything.