gitparseopt2helpm - convert a git rev-parse opts_spec string to a HelpMessage
gitparseopt2helpm [--options] [files]
gitparseopt2helpm converts a specification of options to be parsed by git rev-parse --parseopt
, and converts it to a simple HelpMessage printed to the standard output.
It files is not given, the specification is read from standard input. If --options is given, only a single section (without the title) describing the options is output.
Extract an option specification from a script and build a manual page:
$ awk '/^"/ && p {exit}; p {print}; /^OPTS_SPEC="\\/ {p=1}' myprog.sh \
|gitparseopt2helpm |helpm2pod --man >myprog.1
gitparseopt2helpm was written by G.raud Meyer.
git-rev-parse(1), helpmessage(5)