coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ls: add --sort=width (-W) option to sort by filename width


From: Michael Stone
Subject: Re: [PATCH] ls: add --sort=width (-W) option to sort by filename width
Date: Thu, 15 Apr 2021 10:41:36 -0400

On Thu, Apr 15, 2021 at 07:56:30AM -0500, Carl Edquist wrote:
Anyway, after some time if you find yourself wanting to use the feature a
lot but being bored to type --sort=width each time, maybe that will
provide more inclination to add a short option...

("Yes," you might say, "but that's what shell aliases are for."

But...don't you like munging short options? :)

"Search your feelings, Luke."

...

Lastly, in the help / manpage output, "width" will looks a bit lonely
among the sort options, as the only one without an accompanying short
option:

   --sort=WORD      sort by WORD instead of name: none (-U), size (-S),
                      time (-t), version (-v), extension (-X), width

And, it might be worth noting that in the help / manpage output, the
_only_ documentation (although pithy) for what the different sort types
actually do is in the description for their corresponding short options.

So, you lose the chance to document it in the --help output if you omit
the short opiton.

...


What do you think?  :)

I think it's a heck of a lot easier to add short options than it is to remove them, and that there are more ideas for things to do than there are letters. I'm on the side of make it a long option. In a few years if it's a commonly used thing with a groundswell of demand for a short option, it can always be added. There are a lot of existing short options that aren't used very often, are redundant, or are simply confusing, and it would be really nice (but impossible) to have those letters back. Continuing the tradition of burning short options by default just makes the hole deeper.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]