hot take:
#cli software should (almost) only have --long-options

(like, ok, -i for input is pretty obvious, but -b for "don't buffer output" needs a proper fucking name, looking at you Plan 9 coreutils, I love the OS around you, but please learn to read long options in those argparse macros)

if people weren't using shortopts everywhere, shell programming would be sooo much easier to learn for beginners

@grainloom
I don't think it would matter much if the way to look up an option wasn't grepping in a man page. The shell should be an IDE that gives you contextual help and autocompletion.

@freakazoid @grainloom
Some tools, on some shells, will give hints about args in response to tab complete. I wish (1) this was more common, (2) it was using the same system as command-line help, and (3) it integrated with man pages so you could open up a man page without losing your place in a long under-construction shell one-liner and filter it to only the options relevant to what you're using.

Follow

@enkiv2 there are argument parsers that also integrate with shell completion. I use hackage.haskell.org/package/op

@joeyh @enkiv2
I'm aware of them because some of the tools I use support them. I wish support was much more widespread, and that it also integrated with other forms of online help.

Sign in to participate in the conversation
Octodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!