NAME

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

SYNOPSIS

gitparseopt2helpm [options] [--] [file]

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 file is not given or it is a dash, the specification is read from standard input.

OPTIONS

The options are parsed by getopt(1).

-o, --options

Output only a single section (without the title) that lists the options.

EXIT STATUS

If no option spec was found or if the synopsis contains multiple lines the return status is non zero.

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)