Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: More-verbose tab-completion idiom?

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

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:


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)


Messages sorted by: Reverse Date, Date, Thread, Author