git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH] notes: attach help text to subcommands
Date: Wed, 13 Jun 2012 17:04:04 +0200	[thread overview]
Message-ID: <CAMP44s0YrKJiLiinpScun4mJXC6W11SA=zEtAn5bWbLMnbFa5A@mail.gmail.com> (raw)
In-Reply-To: <CALkWK0k_tP7qGJ9zvAvrPtqMqAtK2QE7mibf2Yt1gssN10a1NA@mail.gmail.com>

On Fri, Jun 8, 2012 at 6:34 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
> 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

  reply	other threads:[~2012-06-13 15:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04  9:35 [RFC/PATCH] parse-options: introduce parse_subcommands Ramkumar Ramachandra
2012-06-04 17:01 ` Junio C Hamano
2012-06-06 14:10   ` Ramkumar Ramachandra
2012-06-06 17:26     ` Junio C Hamano
2012-06-08  8:56       ` [RFC] notes: attach help text to subcommands Ramkumar Ramachandra
2012-06-08 14:49         ` Junio C Hamano
2012-06-08 15:28           ` [PATCH] " Ramkumar Ramachandra
2012-06-08 15:36             ` Jonathan Nieder
2012-06-08 15:54               ` Felipe Contreras
2012-06-08 16:34                 ` Ramkumar Ramachandra
2012-06-13 15:04                   ` Felipe Contreras [this message]
2012-06-08 17:03             ` Junio C Hamano
2012-06-05 23:32 ` [RFC/PATCH] parse-options: introduce parse_subcommands Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMP44s0YrKJiLiinpScun4mJXC6W11SA=zEtAn5bWbLMnbFa5A@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).