From: Felipe Contreras <felipe.contreras@gmail.com>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Cc: Lukasz Stelmach <l.stelmach@samsung.com>,
"notmuch@notmuchmail.org" <notmuch@notmuchmail.org>
Subject: Re: [PATCH] completion: remove "setup" from the list of possible completions
Date: Sat, 5 Jun 2021 08:59:31 -0500 [thread overview]
Message-ID: <CAMP44s0q6QM4mPc55nA9L1O=2YAwM1sqkaKsiK2GbsUzYeevEA@mail.gmail.com> (raw)
In-Reply-To: <87o8oxu1xv.fsf@fifthhorseman.net>
On Thu, Jul 2, 2020 at 3:43 PM Daniel Kahn Gillmor
<dkg@fifthhorseman.net> wrote:
> I sympathize with everyone struggling with the first-world problems in
> this thread. :P
>
> If i had to choose between the status quo and Lukasz's suggestion of not
> completing "notmuch setup", i'd choose the status quo.
Both are right. And while you might have to choose, the project does
not. What do you do when a single behavior doesn't accommodate most
users? You add a configuration.
In git there's a configuration: "completion.commands=-setup", that
takes care of the Bash completions.
And for zsh completions there's a more elegant solution. Commands can
be grouped in tags. By default only the "common-commands" tag is
shown, so for example "git <tab>" shows "fetch", but not
"for-each-ref". If you type "git fo<tab>" however, "for-each-ref" is
completed. The user can change this and show all commands with:
zstyle ':completion:*:*:git:*' tag-order 'all-commands'
So really, we can have the best of both worlds. All you have to do is
decide what kind of configuration you want.
Cheers.
--
Felipe Contreras
prev parent reply other threads:[~2021-06-05 13:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200619104051eucas1p1d5d63105518817bc80b55cfc9158ce2f@eucas1p1.samsung.com>
2020-06-19 10:40 ` [PATCH] completion: remove "setup" from the list of possible completions Łukasz Stelmach
2020-06-20 10:53 ` Reto
2020-06-20 14:04 ` Tomi Ollila
2020-06-20 19:09 ` Ralph Seichter
2020-06-23 21:04 ` Tomi Ollila
2020-06-23 22:46 ` Ralph Seichter
[not found] ` <CGME20200622102303eucas1p2121610b68b1d23705237632706cb06ab@eucas1p2.samsung.com>
2020-06-22 10:22 ` Lukasz Stelmach
2020-06-24 11:44 ` Peter Wang
2020-07-02 19:55 ` Daniel Kahn Gillmor
[not found] ` <CGME20200708151938eucas1p26c111da083d7e8248f6d59593ed40fa7@eucas1p2.samsung.com>
2020-07-08 15:19 ` Lukasz Stelmach
2021-06-05 11:42 ` David Bremner
2021-06-05 13:59 ` Felipe Contreras [this message]
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: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMP44s0q6QM4mPc55nA9L1O=2YAwM1sqkaKsiK2GbsUzYeevEA@mail.gmail.com' \
--to=felipe.contreras@gmail.com \
--cc=dkg@fifthhorseman.net \
--cc=l.stelmach@samsung.com \
--cc=notmuch@notmuchmail.org \
/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://yhetil.org/notmuch.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).