git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stephen Boyd <bebarino@gmail.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: git@vger.kernel.org, spearce@spearce.org,
	felipe.contreras@gmail.com, jrnieder@gmail.com
Subject: Re: [PATCH 1/2] parse-options: Add support for dumping out long options
Date: Thu, 12 Apr 2012 00:12:32 -0700	[thread overview]
Message-ID: <4F868060.1000709@gmail.com> (raw)
In-Reply-To: <20120411140651.GR2289@goldbirke>

On 04/11/2012 07:06 AM, SZEDER Gábor wrote:
> On Wed, Apr 11, 2012 at 03:29:24AM -0700, 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.
>>
>> Some example output:
>>
>>  $ git clone --dump-raw-long-options
>>  --no-verbose --no-quiet --progress --no-progress --no-checkout
>>  --checkout --bare --no-bare --mirror --no-mirror --local --no-local
>>  --no-hardlinks --hardlinks --shared --no-shared --recursive
>>  --no-recursive --recurse-submodules --no-recurse-submodules --template=
>>  --no-template --reference= --no-reference --origin= --no-origin
>>  --branch= --no-branch --upload-pack= --no-upload-pack --depth=
>>  --no-depth --single-branch --no-single-branch --separate-git-dir=
>>  --no-separate-git-dir --config= --no-config
>>
> 
> I think this is a good idea; there are many completion functions that
> fell behind and lack an option or two.
> 
> However, in the completion script we deliberately miss options like
> '--force', but with your series such options will be offered, too.
> 

Hm.. I meant to say something about that in the commit text. I'm willing
to live with wading through some more options when I tab complete if it
means the script never falls out of date with my git installation.

I can envision us putting more smarts into the parse options code to
hide certain options from the raw dump but I'm not sure how useful that
is. Do we need that?

  reply	other threads:[~2012-04-12  7:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 10:29 [PATCH 0/2] Dynamic long options for bash completion Stephen Boyd
2012-04-11 10:29 ` [PATCH 1/2] parse-options: Add support for dumping out long options Stephen Boyd
2012-04-11 10:51   ` Felipe Contreras
2012-04-12  7:42     ` Stephen Boyd
2012-04-11 12:59   ` Jonathan Nieder
2012-04-12  7:02     ` Stephen Boyd
2012-04-11 14:06   ` SZEDER Gábor
2012-04-12  7:12     ` Stephen Boyd [this message]
2012-04-15 12:49       ` SZEDER Gábor
2012-04-15 19:23         ` Junio C Hamano
2012-04-11 10:29 ` [PATCH 2/2] completion: Use parse-options raw output for simple " Stephen Boyd
2012-04-11 13:09   ` Jonathan Nieder
2012-04-11 13:56   ` SZEDER Gábor
2012-04-17 10:44   ` SZEDER Gábor

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=4F868060.1000709@gmail.com \
    --to=bebarino@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=spearce@spearce.org \
    --cc=szeder@ira.uka.de \
    /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).