From: Eric Sunshine <sunshine@sunshineco.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] completion: complete all possible -no-<options>
Date: Sun, 13 May 2018 23:33:07 -0400 [thread overview]
Message-ID: <CAPig+cRUD7FnJqSZ=hkz0GAgOROiY+gvHKRjKVfkKtqDZyt5mA@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8BGs7EOYFKayL-bgvEbKOJiROF52o3SneLyG9Nm6nUngA@mail.gmail.com>
On Tue, May 8, 2018 at 11:24 AM, Duy Nguyen <pclouds@gmail.com> wrote:
> On Mon, Apr 23, 2018 at 7:36 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> I haven't looked at the implementation, so this may be an entirely
>> stupid suggestion, but would it be possible to instead render the
>> completions as?
>>
>> % git checkout --<tab>
>> --[no-]conflict= --[no-]patch
>> --[no-]detach --[no-]progress
>>
>> This would address the problem of the --no-* options taking double the
>> screen space.
>
> It took me so long to reply partly because I remember seeing some guy
> doing clever trick with tab completion that also shows a short help
> text in addition to the complete words. I could not find that again
> and from my reading (also internet searching) it's probably not
> possible to do this without trickery.
Okay.
>> It's also more intuitive than that lone and somewhat weird-looking
>> "--no-" suggestion.
>
> It's not that weird if you think about file path completion, where you
> complete one path component at a time not full path, bash just does
> not show you full paths to everything.
The "path completion" analogy and the dotted configuration variable
analogy (below) don't really help me find "--no-" less weird. We're
used to "/" as a separator in paths, and "." a separator in
configuration variables, so they are easier to digest than "-" somehow
being a separator for --no-<option>.
It _might_ feel as bit less weird if it was presented as --no-<option>
or --no-{...} or --no-<...> or --no-... or something, but those seem
pretty weird too, so perhaps not. Anyhow, it's not a major issue; the
--[no-]foo idea seems pretty intuitive, but if it can't be easily
implemented, then falling back to your --no- idea makes sense.
> I'm arguing about this because I want to see your reaction, because
> I'm thinking of doing the very same thing for config completion. Right
> now "git config <tab>" gives you two pages of all available config
> variables. I'm thinking that we "git config <tab>" just shows the
> groups, e.g.
>
>> ~/w/git $ git config
> add. interactive.
> advice. log.
> alias. mailmap.
> am. man.
>
> Only when you do "git config log.<tab>" that it shows you log.*
Just wondering out loud (again): add.<var> | add.{...} | add.<...> |
add...; those aren't very attractive either, so plain "add." may
indeed be best.
next prev parent reply other threads:[~2018-05-14 3:33 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 [this message]
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
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='CAPig+cRUD7FnJqSZ=hkz0GAgOROiY+gvHKRjKVfkKtqDZyt5mA@mail.gmail.com' \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=pclouds@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).