From: Jonathan Nieder Date: Wed, 11 Apr 2012 12:59:21 GMT Subject: Re: [PATCH 1/2] parse-options: Add support for dumping out long options Message-ID: <20120411125921.GC3161@burratino> In-Reply-To: <1334140165-24958-2-git-send-email-bebarino@gmail.com> 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] * 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-` forms. Long options taking an argument are + printed with a trailing equal sign, as in "`--depth=`". + Negating options ~~~~~~~~~~~~~~~~