From: Duy Nguyen <pclouds@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2 3/3] completion: collapse extra --no-.. options
Date: Tue, 29 May 2018 21:04:31 +0200 [thread overview]
Message-ID: <CACsJy8Cq8LaFf=fvU02e4aepOUXC8CUTFeiUVHVvzYk50AqmVA@mail.gmail.com> (raw)
In-Reply-To: <CAGZ79kZ+kDRHKJj917rZ-=mmusuTcB4_Su-BNupqdQqT6rWRaQ@mail.gmail.com>
On Tue, May 29, 2018 at 8:48 PM, Stefan Beller <sbeller@google.com> wrote:
> On Sun, May 27, 2018 at 1:38 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
>> The commands that make use of --git-completion-helper feature could
>> now produce a lot of --no-xxx options that a command can take. This in
>> many case could nearly double the amount of completable options, using
>> more screen estate and also harder to search for the wanted option.
>>
>> This patch attempts to mitigate that by collapsing extra --no-
>> options, the ones that are added by --git-completion-helper and not in
>> original struct option arrays. The "--no-..." option will be displayed
>> in this case to hint about more options, e.g.
>>
>> > ~/w/git $ git clone --
>> --bare --origin=
>> --branch= --progress
>> --checkout --quiet
>> --config= --recurse-submodules
>> --depth= --reference=
>> --dissociate --reference-if-able=
>> --filter= --separate-git-dir=
>> --hardlinks --shallow-exclude=
>> --ipv4 --shallow-since=
>> --ipv6 --shallow-submodules
>> --jobs= --shared
>> --local --single-branch
>> --mirror --tags
>> --no-... --template=
>> --no-checkout --upload-pack=
>> --no-hardlinks --verbose
>> --no-tags
>
> https://public-inbox.org/git/20180527083828.6919-1-pclouds@gmail.com/
> " There's no magic numbers (previously we keep 3 --no- options)"
>
> Here I see 3 no- options, is the number how many no's to show configurable now?
In a sense, yes. If you write OPT_BOOL(0, "no-foo",...) then that
--no-foo _always_ shows. "git clone" just happens to have three of
them.
--
Duy
next prev parent reply other threads:[~2018-05-29 19:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 18:13 [PATCH/RFC] completion: complete all possible -no-<options> Nguyễn Thái Ngọc Duy
2018-04-18 3:43 ` Junio C Hamano
2018-04-18 15:08 ` Duy Nguyen
2018-04-23 5:36 ` Eric Sunshine
2018-05-08 15:24 ` Duy Nguyen
2018-05-08 16:39 ` Stefan Beller
2018-05-09 3:20 ` Aaron Schrab
2018-05-14 17:14 ` Duy Nguyen
2018-05-14 3:33 ` Eric Sunshine
2018-05-14 16:39 ` Duy Nguyen
2018-05-14 17:03 ` Andreas Heiduk
2018-05-14 17:26 ` Duy Nguyen
2018-05-14 19:58 ` Andreas Heiduk
2018-05-27 8:38 ` [PATCH v2 0/3] " Nguyễn Thái Ngọc Duy
2018-05-27 8:38 ` [PATCH v2 1/3] parse-options: option to let --git-completion-helper show negative form Nguyễn Thái Ngọc Duy
2018-05-27 8:38 ` [PATCH v2 2/3] completion: suppress some -no- options Nguyễn Thái Ngọc Duy
2018-05-27 8:38 ` [PATCH v2 3/3] completion: collapse extra --no-.. options Nguyễn Thái Ngọc Duy
2018-05-29 18:48 ` Stefan Beller
2018-05-29 19:04 ` Duy Nguyen [this message]
2018-06-06 9:41 ` [PATCH v3 0/3] ompletion: complete all possible -no-<options> Nguyễn Thái Ngọc Duy
2018-06-06 9:41 ` [PATCH v3 1/3] parse-options: option to let --git-completion-helper show negative form Nguyễn Thái Ngọc Duy
2018-06-06 9:41 ` [PATCH v3 2/3] completion: suppress some -no- options Nguyễn Thái Ngọc Duy
2018-06-06 9:41 ` [PATCH v3 3/3] completion: collapse extra --no-.. options Nguyễn Thái Ngọc Duy
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='CACsJy8Cq8LaFf=fvU02e4aepOUXC8CUTFeiUVHVvzYk50AqmVA@mail.gmail.com' \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sbeller@google.com \
--cc=sunshine@sunshineco.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).