From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: More-verbose tab-completion idiom?
Date: Wed, 16 Mar 2022 22:21:44 -0400 [thread overview]
Message-ID: <YjKbOBHSJ++JZhH2@fullerene.field.pennock-tech.net> (raw)
In-Reply-To: <CAH+w=7ahY_spSUq=PqgtD1Kv6j_qQeYC_eNcaucz1_r1KUZf=w@mail.gmail.com>
On 2022-03-16 at 18:20 -0700, Bart Schaefer wrote:
> but that assumes you don't have colons or commas or braces in the keys
> or descriptions.
Alas, one of the fields is almost guaranteed to be a URL, thus
containing a colon, and all of those are fair game in the description
field.
In case anyone is interested: while nats(1) (open-source, part of the
CNCF "NATS" project) is changing fast enough that we probably don't want
the completion shipping with zsh at this time, here's a copy of the
completion I'm using today:
https://get-nats.io/zsh.complete.nats
The tool is one of those Golang ones which has `--completion-bash` but
not `--completion-zsh` and where with a bit of custom zsh logic we can
do a "better than stock tool" job of generating a reasonably decent and
useful completion.
(I know that I'm misusing the per-flag description by listing it twice in
this way for the two different location but I haven't yet come up with
an easier-to-maintain approach)
-Phil
next prev parent reply other threads:[~2022-03-17 3:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 0:26 Phil Pennock
2022-03-17 0:50 ` Daniel Shahaf
2022-03-17 1:26 ` Phil Pennock
2022-03-17 1:20 ` Bart Schaefer
2022-03-17 1:24 ` Bart Schaefer
2022-03-17 2:21 ` Phil Pennock [this message]
2022-03-17 16:30 ` Daniel Shahaf
2022-03-17 20:44 ` Bart Schaefer
2022-03-17 21:38 ` Phil Pennock
2022-03-18 0:28 ` Daniel Shahaf
2022-03-18 1:16 ` Phil Pennock
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=YjKbOBHSJ++JZhH2@fullerene.field.pennock-tech.net \
--to=zsh-workers+phil.pennock@spodhuis.org \
--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).