I'm writing a specification for a tool that needs a
--foo option with a mandatory argument
BAR, so for example these are valid calls:
tool -f BAR tool --foo BAR
How do I specify this syntax in the invocation section of a manpage or another formal definition?
This would mean the options are not required, which is not what I intend:
tool [-f BAR | --foo BAR]
But simply omitting the brackets would not make sense either, since the pipe could be mistaken for an actual shell pipe.
POSIX does not have long options, and I cannot find a GNU reference for that either.