From: Marko Myllynen <myllynen@redhat.com>
To: Christian K <syphdias@gmail.com>, zsh-workers@zsh.org
Subject: Re: OpenStack CLI completion
Date: Mon, 8 Mar 2021 17:58:48 +0200 [thread overview]
Message-ID: <3e3a3655-cd05-b0dd-7d26-28ca45c7845c@redhat.com> (raw)
In-Reply-To: <CAJiY44of8c0y1pS_eVjF6-KnCc1pZFSiiwJSs8PPybpyPx1+cw@mail.gmail.com>
Hi Christian,
On 07/03/2021 20.11, Christian K wrote:
>
> I stumbled upon a bug in the completion for openstack command
> introduced in https://www.zsh.org/mla/workers/2016/msg01936.html
>
> I noticed that the suggestions stop for further subcommands at a certain point.
> An example:
> `openstack vpn <tab>` offers "endpoint", "ike", "ipsec" and "service"
> – perfect, selecting "ipsec"!
> `openstack vpn ipsec <tab>` offers nothing – It should offer "policy",
> "site" as can be seen here:
>
> [...]
>
> I have some idea how to fix this by making some assumptions but I am
> not certain it's the right way. I would probably get rid of $subcmd
> and just take the longest string of words connected by underscores as
> $cmd to find the right suggestions.
> Some barriers I currently have:
> * There is also some substitution going on for colon which I just don't get
I have a vague recollection that some (sub)command(s) had a slightly
inconsistent output with colons somewhere which had to be removed for
completions. Could have been just one or two such commands but
unfortunately I don't remember exactly anymore.
> * Why is there a check for not prefix-needed?
>
> Some comments from the original author would be quite helpful if he
> still remembers why it was done a certain way :)
Hmm, this one I don't remember, I guess this might be a common
convention or something like that, probably not specific to _openstack.
I haven't dealt with OpenStack recently so I can't actually test
anything around it anymore but if you could fix the issue that would be
great.
Thanks,
--
Marko Myllynen
next prev parent reply other threads:[~2021-03-08 15:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-07 18:11 Christian K
2021-03-08 15:58 ` Marko Myllynen [this message]
2021-03-18 22:45 ` Christian K
2021-03-19 9:37 ` Marko Myllynen
2021-03-19 22:05 ` Christian K
2021-03-27 16:31 ` Lawrence Velázquez
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=3e3a3655-cd05-b0dd-7d26-28ca45c7845c@redhat.com \
--to=myllynen@redhat.com \
--cc=syphdias@gmail.com \
--cc=zsh-workers@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).