Live data from Hacker News

Debian's Which Hunt

lwn.net

101–110 of 257 posts

Re: Debian's Which Hunt

#101

>"surely no one competent would choose to have a package depend on `which` when a standard POSIX utility can do a better job" I'm immediately turned off by this person. They don't say exactly who or when the command was altered to put the warning in place, but it sounds like one inept, opinionated person decided to flip a switch without caring about any other practical reasons that conflict with his puritan take.

I have never heard about ‘command -v’ before this article. Guess I’m just incompetent.

Re: Debian's Which Hunt

#102
post #96
post #75

Earlier quoted context omitted.

You can use the `command` command to determine which `which` you use ;) % which which which: shell built-in command % command which which /run/current-system/sw/bin/which I like to use `which` together with `realpath` to see what exact version of a program I'm using, e.g. (in Fish), [I] ⋊> ~ realpath (command which which) /nix/store/3w3rvxhlv5dcmdih72da6m613qyav9kw-which-2.21/bin/which Idk if it's also POSIX, but `co…

tcsh on my system: $ tcsh --version tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-apple-darwin) options wide,nls,dl,bye,al,kan,sm,rh,color,filec $ tcsh % command -v command command % command -V command command is a shell builtin % builtins | grep command %

Yeah, this is probably because macOS has done something very, very weird, and added an executable `/usr/bin/command` to the system. These are the contents on the old MacBook I have for work right here:

    #!/bin/sh
    # $FreeBSD: src/usr.bin/alias/generic.sh,v 1.2 2005/10/24 22:32:19 cperciva Exp $
    # This file is in the public domain.
    builtin `echo %{0##*/} | tr \[:upper:] \[:lower]` ${1+"$@"}
If you have SIP disabled, try renaming `/usr/bin/command` to `/usr/bin/command.wtf` and see if `tcsh` still acts like there's a `command` command.

Re: Debian's Which Hunt

#103
When I read stuff like this I can't help but wonder how anything ever even gets done on this project. The amazing thing is 'which' was working perfectly fine for everyone. Just leave it alone? The amount of time they wasted on debating this is staggering compared to just not changing it.

Re: Debian's Which Hunt

#104
post #84

Here's how zsh 5.8 behaves on macOS: $ which {which,type,command,vi} which: shell built-in command type: shell built-in command command: shell built-in command /usr/bin/vi $ type {which,type,command,vi} which is a shell builtin type is a shell builtin command is a shell builtin vi is /usr/bin/vi $ command -v {which,type,command,vi} which type command /usr/bin/vi Which is quite different from how bash 5.1 behaves: bas…

Wait what macOS has an executable called `command`? Does any other OS?

It’s a shell built-in.

Re: Debian's Which Hunt

#105

When I read stuff like this I can't help but wonder how anything ever even gets done on this project. The amazing thing is 'which' was working perfectly fine for everyone. Just leave it alone? The amount of time they wasted on debating this is staggering compared to just not changing it.

>I can't help but wonder how anything ever even gets done on this project

Slowly, methodically, and with minimal user impact.

As mentioned at the end of the article, what first appears a waste of time for a small issue could also be seen as a beautiful illustration of the democratic process that makes Debian so stable/widely adopted.

Re: Debian's Which Hunt

#106
post #105

When I read stuff like this I can't help but wonder how anything ever even gets done on this project. The amazing thing is 'which' was working perfectly fine for everyone. Just leave it alone? The amount of time they wasted on debating this is staggering compared to just not changing it.

>I can't help but wonder how anything ever even gets done on this project Slowly, methodically, and with minimal user impact. As mentioned at the end of the article, what first appears a waste of time for a small issue could also be seen as a beautiful illustration of the democratic process that makes Debian so stable/widely adopted.

And yet they destabilized things by adding the deprecation/trying to get rid of it. And what even was the point of that?

Re: Debian's Which Hunt

#107
post #84

Here's how zsh 5.8 behaves on macOS: $ which {which,type,command,vi} which: shell built-in command type: shell built-in command command: shell built-in command /usr/bin/vi $ type {which,type,command,vi} which is a shell builtin type is a shell builtin command is a shell builtin vi is /usr/bin/vi $ command -v {which,type,command,vi} which type command /usr/bin/vi Which is quite different from how bash 5.1 behaves: bas…

Wait what macOS has an executable called `command`? Does any other OS?

BSD and Linux do.

Re: Debian's Which Hunt

#108
post #45

I'm a descriptivist when it comes to standards. When everyone uses `which`, POSIX should add it. "but it's non-standard!" can be fixed by making it a standard.

Also, POSIX is basically irrelevant now. There are only two Unixen that anyone uses: RMS/Linux and whatever outdated garbage userspace Apple is shipping with macOS.

Re: Debian's Which Hunt

#109
post #105

Earlier quoted context omitted.

>I can't help but wonder how anything ever even gets done on this project Slowly, methodically, and with minimal user impact. As mentioned at the end of the article, what first appears a waste of time for a small issue could also be seen as a beautiful illustration of the democratic process that makes Debian so stable/widely adopted.

And yet they destabilized things by adding the deprecation/trying to get rid of it. And what even was the point of that?

They ≠ They

Re: Debian's Which Hunt

#110
post #105

Earlier quoted context omitted.

>I can't help but wonder how anything ever even gets done on this project Slowly, methodically, and with minimal user impact. As mentioned at the end of the article, what first appears a waste of time for a small issue could also be seen as a beautiful illustration of the democratic process that makes Debian so stable/widely adopted.

And yet they destabilized things by adding the deprecation/trying to get rid of it. And what even was the point of that?

They also mentioned how this could happen at the end of the article.

In the end they are working on a distro with certain ideals and this illustrates how they can achieve things with their ideals in mind.

Post reply on HN