On 2022-12-13 at 10:34:59 +0000, Lukas Jirkovsky <l.jirkovsky@gmail.com> wrote:
On Tue, 13 Dec 2022 at 07:25, Ralph Corderoy <ralph@inputplus.co.uk> wrote:
Hi u34,
I think long command line options are more readable compared to short one. There fore, I suggest:
I think the short one-letter names combined into a single ‘-’ are more readable, as I suspect do many others accustomed to their decades-long use across all Unix commands, so I suggest things stay as they are. :-)
For commands and options I've been using for decades, absolutely. For newer or lesser used commands, or commands with newer options, well, maybe. Now who told tar and ps that they don't need the dash? ;-)
The added benefit is that the short options are faster to search for in the man page.
Unless there's --long-option and --other-option, in which case searching for -o takes longer. And searching for various regular expressions that fail on various man pages definitely takes even more longerer™. TL;DR: I'm usually in favor of using long options in a script (those decades-old commands and options notwithstanding). Without the man page, I have some chance of figuring out what --use-regular-expressions does, but less of spotting the "e" (and figuring out what it does) in the middle of -loser.