It appears to me that everyone has their own idea on how to write a synopsis describing command usage for the end user.
For example, this is the format from man grep
:
grep [OPTIONS] PATTERN [FILE...]
grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]
Now this has some syntax that appears in other manpages. []
is recognized as optional, and ...
makes sense as multiple of the same input.
But people use |
or /
for OR and there are others that will reverse what []
means. Or they do not give any indication as to where [OPTIONS]
goes.
I would like to follow a standard for what I write, but every website I look at tells me something different.
Is there an actual standard way of writing synopses, or is the convention just what people have been doing over time?