There's something to be said about what the user expects.
On posix, I expect all cli stuff to roughly do the following when something goes wrong..
- If an internal error occurred, I don't see the manual or usage examples, I see what the error message is, the thing really dies out.
- If there's a usage error, or a missing argument or I see the -h or --help flag, I expect to see the brief usage statement.. such as:
command-name [OPTIONS].. OTHERARGS..
Brief one sentence description of command usefulness.
-h help
-v version
-o other command flag
-a string this one takes an arg
For more info, try 'man command-name'
And that's it, period.. no manual info this far. Just a brief warning maybe, and usage. Maybe not even usage if you don't want to - unless they ask for -h(elp), but an error.
See the 'locate' command for example of this, try 'locate', and you get warning, try 'locate -h' and you get brief usage, try 'man locate' and you get the whole enchillada.
- If the user specifially request the manual- then I show the manual, all of it- that pertains to that command.
| [reply] [d/l] |