The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Greg 'groggy' Lehey <grog@lemis.com>
To: Steve Nickolas <usotsuki@buric.co>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] Command line options and complexity
Date: Thu, 12 Mar 2020 14:09:17 +1100	[thread overview]
Message-ID: <20200312030917.GJ89512@eureka.lemis.com> (raw)
In-Reply-To: <alpine.BSF.2.02.2003112039450.72150@frieza.hoshinet.org>

[-- Attachment #1: Type: text/plain, Size: 4120 bytes --]

On Wednesday, 11 March 2020 at 20:53:12 -0400, Steve Nickolas wrote:
> I went through all the switches defined by POSIX, and figured that
> those 26 could be cut down.

A brave man to defy POSIX!  I wasn't so brave, which is why we have
the -y option.

> My concept reduced the number of switches from 26 to 9 (FLRadfiln).
> Of course, the idea is to be more minimalist than POSIX, so some
> people's opinions on what is or isn't necessary may differ from
> mine.

OK, let's compare notes:

> I felt -A was a redundant "almost -a".

Arguably -a could go too.  The distinction seems arbitrary.

> I felt -C and -x were redundant because a tool like column(1) could be
> used to do the same job (even though column(1) isn't POSIX).

Neither would this ls(1) be.

> I felt -H was a redundant "almost -L".

No arguments, but I suspect that somebody had a good reason for this
distinction, and removing it could cause problems.

> I felt -S, -r and -t could be implemented in other ways using sort(1).

-S isn't POSIX.  And to implement it without an option would mean
removing -h.

As I mentioned earlier, -t can't be done by a filter without
significantly modifying the timestamp output.  That was my rationale
for the -D option, which allows sorting by an external filter.

-r could work.

> I felt -c and -u were meaningless, but that's because of the filesystems I
> usually work with that do not have functional equivalents.  -u for one is
> completely useless on VFAT even though it has such timestamps!  YMMV.

I think this says more about your file systems than about the options.
I find both incredibly useful, and there's no easy way to get the
information elsewhere.  stat(1) would be an option, but then that
could replace ls(1) completely.

> I felt -g and -o could be replaced by cut(1).

-g is already obsolete in FreeBSD (accepted and ignored).  -o has
already been repurposed (show file flags).

> I felt -k wasn't really all that important.  Just halve the numbers.

Agreed.

> I felt -m wasn't really all that important.  There's other ways to convert
> to that format, no doubt, through filters.

Possibly.  Certainly I wouldn't miss it.

> I felt -p was a redundant "almost -F".

OK.

> I felt -q could be done just fine with something like tr(1).

I think that it could be replaced by -b.  "?" isn't really very
helpful.

> I felt -s was a redundant "kindasorta -l".

I can't agree with that, but I've never used it.  The only sensible
use would appear to be talking about disk blocks, but on FreeBSD at
any rate it looks at the BLOCKSIZE environment variable, which I have
set to 1048576 (so that utilities will display in MB where
appropriate), and that's what -s does too:

   2079 -rw-r--r--  1 grog  wheel   2,178,735,915  4 Oct 11:15 Willkommen-bei-den-Honeckers---Spielfilm,-Deutschland-2016-20191003-125200.mp4

That makes it pretty useless.

So, any others?

-G: Colorized output.  I'd be *really* happy to get rid of this, but
    it's not easy to instate with a filter, so I suppose there are
    enough people who like it that it will have to stay.

-P: Seems only to be there to cancel a -H or -L.

-W: "Display whiteouts when scanning directories".  I don't even
    understand what that is.

-a: See discussion of -A.

--color: Again, no thanks.

-f: We haven't really discussed this one.  If you want to remove -S,
    -r and -t, then arguably -f should become the default and be
    -removed.

-n: Make it the default and require a filter to convert group and user
    numbers to IDs.

-y: If we get rid of all sorting, it will no longer be needed.

-,: Make the option standard: output numbers with commas every 3
    digits.  Then this option specification wouldn't be needed.

Of course, none of this will happen.  But it is interesting to think
about it.  In particular, options like -g and -o, which are no longer
modern.

Greg
--
Sent from my desktop computer.
Finger grog@lemis.com for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

  reply	other threads:[~2020-03-12  3:09 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 18:15 Jon Steinhart
2020-03-03 18:44 ` Adam Thornton
2020-03-04  4:11   ` Tyler Adams
2020-03-04  6:03     ` Dave Horsfall
2020-03-04  6:48       ` arnold
2020-03-04 21:17         ` Dave Horsfall
2020-03-05  0:49         ` Lyndon Nerenberg
2020-03-05 20:54           ` Dave Horsfall
2020-03-05 22:01             ` William Cheswick
2020-03-04 21:50   ` Random832
2020-03-04 23:19     ` Steffen Nurpmeso
2020-03-05  6:12     ` Alan D. Salewski
2020-03-04 22:03   ` Random832
2020-03-04 23:25     ` Terry Jones
2020-03-10 23:03 ` Dan Stromberg
2020-03-11  3:18   ` Dave Horsfall
2020-03-11  4:02     ` Steve Nickolas
2020-03-11 22:56     ` Greg 'groggy' Lehey
2020-03-11 23:14       ` Dan Cross
2020-03-12  0:42         ` Greg 'groggy' Lehey
2020-03-12  0:53       ` Steve Nickolas
2020-03-12  3:09         ` Greg 'groggy' Lehey [this message]
2020-03-12  3:34           ` Steve Nickolas
2020-03-13  1:02             ` Greg 'groggy' Lehey
2020-03-12  5:38         ` Dave Horsfall
2020-03-12  6:48         ` Peter Jeremy
2020-03-12  7:37           ` Steve Nickolas
2020-03-12  7:42             ` Warner Losh
2020-03-12 23:57           ` Greg 'groggy' Lehey
2020-03-12  5:22       ` Dave Horsfall
2020-03-12  5:35         ` Steve Nickolas
2020-03-13  0:36         ` Greg 'groggy' Lehey
2020-03-13 11:26           ` Dave Horsfall
2020-03-14  2:13           ` Greg A. Woods
2020-03-14  4:31             ` Greg 'groggy' Lehey
2020-03-04 14:06 Nelson H. F. Beebe
2020-03-04 16:17 ` John P. Linderman
2020-03-04 17:25   ` Bakul Shah
2020-03-05  0:55   ` Rob Pike
2020-03-05  2:05   ` Kurt H Maier
2020-03-05  4:17     ` Ken Thompson via TUHS
2020-03-05 14:53       ` Dan Cross
2020-03-05 21:50       ` Dave Horsfall
2020-03-05 21:56         ` Warner Losh
2020-03-08  5:26           ` Greg 'groggy' Lehey
2020-03-08  5:32             ` Jon Steinhart
2020-03-08  9:30               ` Tyler Adams
     [not found]                 ` <CAC0cEp8eFRkkLTw88WVaKZoKy+qsrhuC8LkzmmsbqtdZgMf8eQ@mail.gmail.com>
     [not found]                   ` <CAEuQd1D7+dfap98AwPo2W41+06prrcVaAWk3Ve-ve0uQ0xBu3Q@mail.gmail.com>
2020-03-09 21:06                     ` John P. Linderman
2020-03-09 21:22                       ` Kurt H Maier
2020-03-11 17:41                         ` John P. Linderman
2020-03-11 21:29                           ` Warner Losh
2020-03-12  0:13                             ` John P. Linderman
2020-03-12  0:34                               ` Chet Ramey
2020-03-12 12:57                             ` John P. Linderman
2020-03-12 19:24                               ` Steffen Nurpmeso
2020-03-08  9:51             ` Michael Kjörling
2020-03-05  4:57 Doug McIlroy
2020-03-05 22:17 ` Diomidis Spinellis
2020-03-10 16:15 Doug McIlroy
2020-03-10 17:38 ` Dan Cross
2020-03-10 17:44   ` Bakul Shah
2020-03-10 18:09     ` Dan Cross
2020-03-10 18:42 Doug McIlroy
2020-03-10 19:38 ` Dan Cross
2020-03-13 10:45 Dave Horsfall
2020-03-14  4:35 ` Greg 'groggy' Lehey
2020-03-14 19:52   ` John P. Linderman
2020-03-14 20:25     ` Steffen Nurpmeso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200312030917.GJ89512@eureka.lemis.com \
    --to=grog@lemis.com \
    --cc=tuhs@tuhs.org \
    --cc=usotsuki@buric.co \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).