Re: [PATCH] notes: attach help text to subcommands
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Jun 13, 2012, 15:04 UTC
- Message-ID
- <CAMP44s0YrKJiLiinpScun4mJXC6W11SA=zEtAn5bWbLMnbFa5A@mail.gmail.com>
- In-Reply-To
- <CALkWK0k_tP7qGJ9zvAvrPtqMqAtK2QE7mibf2Yt1gssN10a1NA@mail.gmail.com>
On Fri, Jun 8, 2012 at 6:34 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 25 quoted lines
> Hi Jonathan and Felipe, > > Jonathan Nieder wrote: >> Ramkumar Ramachandra wrote: >> >>> Thanks. I wish we could do something aout USAGE_OPTS_WIDTH and >>> USAGE_GAP; I stole them from parse-options. >> >> Expose them in parse-options.h? Or put this functionality in a >> parseopt-related file? > > Exposing a `subcommand_usage` in parse-options.h may not be a bad idea. > > Felipe Contreras wrote: >> There's many commands that would benefit from this. In addition to >> provide a better help for subcommands, this can be used to generate >> automatically the shell completion list of subcommands. >> >> Even more; in zsh it would be possible to show this help text directly >> in the completion. > > How exactly is that going to work? `git notes -h` doesn't output > this- so the only way to get this output is to invoke `git notes` with > an invalid subcommand. To fix that, I'd have to teach parse-options > about subcommands.
Yeah, something like that. See this proposal:
http://mid.gmane.org/1334140165-24958-2-git-send-email-bebarino@gmail.com
I would prefer something like 'git info --subcommands notes' or something like that.
Cheers.
-- Felipe Contreras