4 ms·
Just, whatever, you do, please please PLEASE PLEASE support `--help`. I don't mean `-h` or `-help`, I mean `--help`. There's only one thing the long flag can p
by exmadscientist 6y ago
Just, whatever, you do, please please PLEASE PLEASE support `--help`. I don't mean `-h` or `-help`, I mean `--help`.
There's only one thing the long flag can possibly mean: give me the help text. I understand that your program might prefer the `-help` style, but many do not. And do you know how I figure out which style your program likes? That's right, I use `--help`. I have to use `--help` rather than just `-help` because of GNU userspace tools, among others. It seems unlikely they're going to suddenly clean up their act this decade, so I have to default to starting with `--help`.
So it's very frustrating when the response to `program --help` is "Argument --help not understood, try -help for help." This is then often followed by me saying indecent things about the stupid program.
- misnome 6y agoOr worse - you pass --help and the script runs and starts doing stuff
- klysm 6y agoAnd is then not robust against being stopped via ctrl c
- arp242 6y agoEven better: support both -h and --help. Also, don't pipe the help output to stderr if the user requested help. "prog --help | less" not working is annoying.
- Annatar 6y agoTraditional UNIX®️ options for help are -? and -h. --long-options are a horrid GNU-ism and shunned by clean UNIX®️ compliant programs, because such programs come with detailed, professionally written manual pages which contain extensive SYNOPSIS and EXAMPLES sections. Implementing --long-options makes the poor users type much more, hurting ergonomy and the users' long-term productivity and efficiency.
- m463 6y agoI think long human-readable options are very nice when invoking a command in a script. A (hypothetical) script can invoke rsync like this: rsync -Oogx but long options makes things more readable: rsync \ --omit-dir-times \ --owner \ --group \ --one-file-system It also helps when you're wondering if '-d' means debug or directory. (although yes, it can allow options to be added to a program ad-nauseum)
- hibbelig 6y agoI see nothing wrong with extensive SYNOPSIS and EXAMPLES sections for programs using --long-options. The fish shell extracts completion information from man pages, so that the user does not have to type so much and they get useful output, pulled from the manpage, no less.
- jaen 6y ago-? - what are you smoking? :) That is a glob in most shells, try putting a file named "-a" in your current directory and see what happens... The proper way to write it would be -\?
- Annatar 6y agoIt goes without saying that it has to be escaped in most shells, but that is the traditional option for help on UNIX®️. You would be well advised to educate yourself on the history of UNIX®️ before coming up with "what are you smoking?"
- vasilakisfil 6y agoalso --version (and -v if possible, although that can be mapped to --verbose)