Re: [PATCH 1/2] parse-options: Add support for dumping out long options
On 04/11/2012 05:59 AM, Jonathan Nieder wrote:
Show 24 quoted lines
> Stephen Boyd wrote:
>
>> The bash completion script wants to know what the long options are for a
>> certain command at runtime. Add a magical long option that nobody could
>> possibly ever use (--dump-raw-long-options) to get this information.
>
> Neat. Probably should be documented:
>
> diff --git i/Documentation/gitcli.txt w/Documentation/gitcli.txt
> index f734f97b..0de074ec 100644
> --- i/Documentation/gitcli.txt
> +++ w/Documentation/gitcli.txt
> @@ -96,6 +96,11 @@ usage: git describe [options] <committish>*
> are deprecated, and such options are hidden from the default usage. This
> option gives the full list of options.
>
> +--dump-raw-long-options::
> + prints a space-separated list of supported options, including
> + negated `--no-<foo>` forms. Long options taking an argument are
> + printed with a trailing equal sign, as in "`--depth=`".
> +
>
> Negating options
> ~~~~~~~~~~~~~~~~