NAME

gitparseopt2helpm - convert a git rev-parse opts_spec string to a HelpMessage

SYNOPSIS

gitparseopt2helpm [--options] [files]

DESCRIPTION

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.

EXAMPLES

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

AUTHOR

gitparseopt2helpm was written by G.raud Meyer.

SEE ALSO

git-rev-parse(1), helpmessage(5)