News for hackers. Stuff that matters.
Re:The -a to -z of Command-Line Options (2003) by pwaivers on Monday December 10, 2018 @12:42PM (#18649629)
> -h Help. This is actually less common than one might expect offhand — for much of Unix's early history developers tended to think of on-line help as memory-footprint overhead they couldn't afford.

This one does surprise me. It is almost always one of the first options I try. That or "--help".

Re:The -a to -z of Command-Line Options (2003) by cyphar on Monday December 10, 2018 @01:26PM (#18649993)
A friend of mine once had telnet'd into their (awful) ISP home router, and started playing with the various commands. Not thinking, they typed "init -h" and the router then promptly stopped routing packets. Turns out the (probably custom-written) "init" automatically sets the runlevel to single-user mode, and they handn't bothered to implement "-h".

For this reason, I always use "man <command>". The prevalence of "--help" has always bothered me since a badly-written command could start doing all sorts of unexpected things, when you just wanted to see the documentation. I've seen all sorts of ISV software not implement --help correctly. "man" always works.

Re:The -a to -z of Command-Line Options (2003) by jancsika on Monday December 10, 2018 @04:10PM (#18651181)
Ooh, good catch.

"man oven" = look up your oven model in your Home Manual

"oven -h" = turn your oven dial past "Broil" and hope it pops out a hidden cheat sheet

Re:The -a to -z of Command-Line Options (2003) by smhenderson on Monday December 10, 2018 @12:55PM (#18649722)
I find in most modern tools whether or not -h or --help is implemented using them often yields at least a usage statement.

I'm sure it's just default "I don't recognize the option so here's how to use this tool" message but the result is the same.

There are exceptions of course, e.g. mysql uses -h for host so you just get an error message about requiring an argument. --help is implemented properly in this case though.

Re:The -a to -z of Command-Line Options (2003) by mort96 on Monday December 10, 2018 @04:18PM (#18651242)
I usually use `-h`, because it's shorter to type than `--help`. I find I encounter this kind of message way too frequently:

    wc: invalid option -- 'h'
    Try 'wc --help' for more information.
Re:The -a to -z of Command-Line Options (2003) by smhenderson on Tuesday December 11, 2018 @11:50AM (#18656604)
That is annoying, I actually prefer the behavior I described. If an argument is not recognized I just want a usage message so I can check my syntax quickly.