I am writing the built-in help for a command line program. The exact name is irrelevant, so let's use
foo as a placeholder.
This utility can be called with some arguments (like
foo -v) or without any arguments at all (just
I'm struggling with describing the no-argument call in the built-in help. (There's a common practice that the
--help argument is used to print that help on the screen.)
A common output of
-h command looks like this:
$ foo -h foo [OPTIONS...] Do FOO in the most awesome way possible -h --help Show this help -v --version Show package version
Note the pattern for explaining arguments:
(short) (long) Explanation
The no-argument call doesn't fit in this pattern. All these variants look quite unnatural:
foo Do the FOO Do the FOO (no arguments) Do the FOO
In search for examples I've looked at several utilities that have valid no-argument calls (e.g.
bash and other shells,
systemctl), but none of them describe that in the
The question: what is the proper way of documenting the no-arguments call in the built-in help?
- Should I write something in the place of
- Or should I explain that in a different place (where)?