felixSchl/neodoc

Add 'option.helpFlags' and 'option.versionFlags' to spec implicitely

felixSchl opened this issue · 1 comments

Just before passing the spec to the arg parser, prepend an optional group of

[ helpFlag0 | helpFlagN | versionFlag0 | versionFlagN ]

So, for option.helpFlags = [ '-h', '--help' ] and option.versionFlags = [ '-v', '--version' ], this ought to look like:

[-h|--help|-v|--version]

A more lenient form could maybe expand to:

[[-h] [--help] [-v] [--version]]

This allows these special, ubiquitous flags to be omitted from the spec.

This will be easily possible once the work outlined in #42 has been completed. It is currently blocked since we serialize post solving, which is a lossy transform.