NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/58740: ls: flag -O incorrectly described in MAN and buggy
The following reply was made to PR bin/58740; it has been noted by GNATS.
From: tlaronde%kergis.com@localhost
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/58740: ls: flag -O incorrectly described in MAN and buggy
Date: Sun, 13 Oct 2024 16:10:22 +0200
On Sat, Oct 12, 2024 at 11:15:02AM +0000, Robert Elz via gnats wrote:
> The following reply was made to PR bin/58740; it has been noted by GNATS.
>
> From: Robert Elz <kre%munnari.OZ.AU@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc:
> Subject: Re: bin/58740: ls: flag -O incorrectly described in MAN and buggy
> Date: Sat, 12 Oct 2024 18:10:45 +0700
>
> Date: Sat, 12 Oct 2024 07:20:02 +0000 (UTC)
> From: "tlaronde%kergis.com@localhost via gnats" <gnats-admin%NetBSD.org@localhost>
> Message-ID: <20241012072002.6897E1A923E%mollari.NetBSD.org@localhost>
>
>
> | $ find . -type f | sed 's!^.*/\([^/]*\)$!\1!'
> |
> | does the trick with the minimal cost of one supplementary exec (the
> | one of sed(1)).
>
> I don't know anything about the -O option, or why it is there,
> but that is not a replacement. Do remember that all those many
> options you mentioned ls having can be combined with -O, duplicating
> all of that in some kind of script or function (probably using stat(1)
> sort(1), ... is probably possible, but not likely a productive use of
> anyone's time.)
>
OK, granted. But then:
1) It doesn't do, at the present, what it is described to do;
2) It doesn't work, at the present, with at least some other options.
The conclusion is that at present nobody uses it since nobody can rely
on it or someone would have already made a PR stating that it doesn't
work---I stumbled upon it only by accident.
So it seems to me simpler to remove it before it spreads to avoid
the burden to have to verify that it works with any combination of
the zillion flags, since the '-P' is a valuable addition making it
easy, with combination with '-p', to invoke ls(1) with whatever
other options, and then filtering the result against the trailing
'/'.
--
Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
http://www.kergis.com/
http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
Home |
Main Index |
Thread Index |
Old Index