Re: [PATCH] completion: remove "setup" from the list of possible completions

Subject: Re: [PATCH] completion: remove "setup" from the list of possible completions

Date: Thu, 02 Jul 2020 15:55:24 -0400

To: Peter Wang, Lukasz Stelmach

Cc: notmuch@notmuchmail.org

From: Daniel Kahn Gillmor


On Wed 2020-06-24 21:44:01 +1000, Peter Wang wrote:
> On Mon, 22 Jun 2020 12:22:50 +0200 Lukasz Stelmach <l.stelmach@samsung.com> wrote:
>> It was <2020-06-20 sob 12:53>, when Reto wrote:
>> > On Fri, Jun 19, 2020 at 12:40:49PM +0200, Łukasz Stelmach wrote:
>> >> Having "setup" in the set requires entering three instad of two characters
>> >> for "search". Since "setup" is rearly used it makes little sense to have
>> >> it in the set and cripple UX for much more frequently used "search".
>> >
>> > I very much disagree with this patch.
>> > The completions should contain all possible values, saving a single keystroke is
>> > certainly not a valid reason to remove a valid option from the completions.
>> >
>> > Write an alias into your bashrc if that bothers you so much... Then you can save
>> > much more keystrokes.
>> 
>> I already have several aliases covering most of my use cases, however, I
>> still use "notmuch search" from time to time and I came to a conclusion
>> expressed in this patch. Of course, as a random user, I can only suggest
>> and by no means insist on applying it.
>
> Another possibility may be to rename "notmuch setup" to "notmuch init",
> treating "setup" as a deprecated synonym for "init". The completions
> would include "init" but not "setup".

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.

I value having all non-deprecated subcommands show up in tab completion.
This is particularly important for someone who is just starting to use
notmuch, and may use tab completion for discoverability.  If they can't
find the very first expected subcommand to be used in tab completion
exploration, that is pretty weird.

That said, i appreciate Peter's clever attempt to thread the needle.

Unfortunately, changing "setup" to "init" moves "notmuch insert" from
"notmuch i<TAB>" to "notmuch in<TAB>", so you're sort of robbing from
Peter to pay Paul.  And I'm having difficulty coming up with another
good subcommand name with an unambiguous prefix to move "setup" to.

I also note that we have no independent manpage for "notmuch-setup",
it's just symlinked from notmuch.1.gz.

Another "clever" approach to assuage the tab-completion-for-conveience
advocates would be to introduce a (non-deprecated) alias for "search"
that itself would be fewer keystrokes before tab completion (e.g. "srch"
is two keystrokes because "sr" is unambiguous, "query" is just one,
because "q" is unambiguous).

Overall, i value consistency and completeness and i would not like to
see the tab completion be either an inconsistent or incomplete
representation of the options available to the user from the command
line.

    --dkg
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: