3 ms·
If your program detects -? and tells the user to use -h or --help or --long-help or --full-help you should be kicked in the crotch. Just show me the help.
by wang_li 3y ago
If your program detects -? and tells the user to use -h or --help or --long-help or --full-help you should be kicked in the crotch. Just show me the help.
- rascul 3y agoI often show help if an unknown option was given but in the cases I don't I am not going through a list of special cases that I don't even know of to try and determine that someone wants the help text. I've never even seen -? before that I can recall.
- account42 3y ago/? is common for help on Windows and some programs translate that to -? elsewhere or just accept both / and - for their arguments.
- SAI_Peregrinus 3y agoI'd say -h and --help should return 0 & print help to stdout. Any unknown option should return EINVAL and output an error message and help text to stderr.