... but don't get me started on people who think it's ok to use a single hyphen to start a multicharacter option, or don't let you put multiple single character options after the single hyphen...
... but don't get me started on people who think it's ok to use a single hyphen to start a multicharacter option, or don't let you put multiple single character options after the single hyphen...
-? has been a common switch for decades. I've been implementing it (along with the synonyms -h, --help, etc.) in all of my programs since about the '90s.
I suggest supporting at least all of the following: -h, -help, --help, -?, /h, /?, help, <no flag> (if possible). Other flags don’t have to follow these rules, but I think help can be an exception.
And maybe you should print the help any time the user enters a bad command.
I'm just saying that I hadn't realized programs did that. And I've been around a long, long time. I guess I'm just blind.
-h/--help are all I ever see in macOS CLI tools, in any case.
There are quite a few older programs that do that, including ImageMagick and FFmpeg.