From: Philippe Proulx <eeppeliteloop@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Daniel Shahaf <d.s@daniel.shahaf.name>, Zsh Users <zsh-users@zsh.org>
Subject: Re: How to complete with _arguments() depending on an option and within a loop
Date: Wed, 12 May 2021 11:14:59 -0400 [thread overview]
Message-ID: <CAB4xu_17dJDXUVHtksHTJ=xGEsrW=7K-t5jvGOd_n=_kYG55mw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7aZCWOXij65=TDcuV1hcus8-gq-zJcEfP7XT0gVRW-7sg@mail.gmail.com>
On Wed, May 12, 2021 at 11:11 AM Bart Schaefer
<schaefer@brasslantern.com> wrote:
>
> On Wed, May 12, 2021 at 6:44 AM Philippe Proulx <eeppeliteloop@gmail.com> wrote:
> >
> > $ beep --device --new <tab>
> >
> > Zsh offers `--device` again, because the completion script "saw" the
> > `--new` word, without taking any parsing into account.
>
> What everybody seems to forget about completion is that it's supposed
> to save the user typing time, not save the user from thinkos. If the
> user is uncomprehending enough to select --device twice just because
> completion offered it, it's not our job to come to the rescue.
You'd love Bash then!
I believe the complexity of Zsh completion can translate into better
command line UX.
Why would _argument() support not repeating an option (the default)
then (`--opt[my option]` vs `*--opt[my option]`)?
Phil
next prev parent reply other threads:[~2021-05-12 15:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 17:30 Philippe Proulx
2021-05-11 14:12 ` Daniel Shahaf
2021-05-12 13:44 ` Philippe Proulx
2021-05-12 15:11 ` Bart Schaefer
2021-05-12 15:14 ` Philippe Proulx [this message]
2021-05-12 15:50 ` Bart Schaefer
2021-05-12 16:14 ` Ray Andrews
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAB4xu_17dJDXUVHtksHTJ=xGEsrW=7K-t5jvGOd_n=_kYG55mw@mail.gmail.com' \
--to=eeppeliteloop@gmail.com \
--cc=d.s@daniel.shahaf.name \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@zsh.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://git.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).