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

Re: OpenStack CLI completion



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





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