Thread (6 messages) flat view 6 messages, 4 authors, 2016-06-15

Re: [PATCH] notes: attach help text to subcommands

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:54:01

Possibly related (same subject, not in this thread)

Hi Jonathan and Felipe,

Jonathan Nieder wrote:
Ramkumar Ramachandra wrote:
quoted
 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.

Ram
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help