6 ms·
I do not understand this Debian 'which' kerfuffle, but seems a big argument over nothing. But for me, 'type' is my go to in scripts. And as a tcsh user, I nev
by jmclnx 5y ago
I do not understand this Debian 'which' kerfuffle, but seems a big argument over nothing.
But for me, 'type' is my go to in scripts. And as a tcsh user, I never knew 'which' was a thing in Bourne shells until I checked a few minutes ago. I do not know when it appeared, but I thought in the 'old days' 'which' was specific just to [t]csh.
Also, I never heard of 'command -v' until I saw it in LWN a few days ago :)
- aidenn0 5y agowhich is not a thing in bourne shells; it's a separate executable. If it were a builtin then there wouldn't be a kerfuffle; there are multiple implementations of "which" and Debian doesn't want to privilege one of them, but if Debian base scripts use one, then it must privilege one of them.
- shadowgovt 5y agoIn this case, the simplest solution is to probably privilege one of them and then everybody get back to work.
- yakubin 5y agoIt is a built-in in zsh. Thanks to that, it will recognize when something is a built-in, an alias, a function or a command and report accurately what will be executed when you type it in without the "which".
- pxc 5y agoThat's what `type` (or in zsh, `whence`) is for. Aliasing `which` just makes the behavior of running `which` slightly less predictable, and if what you actually want is the behavior of the `which` program, you then need to (know to) run `command which` instead.
- marcosdumay 5y ago> and Debian doesn't want to privilege one of them Any reason for that? Insisting on not choosing a preferred set of software seems like a really bad decision for a distro.