Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completion-zsh error #1694

Closed
lixd opened this issue May 10, 2022 · 2 comments
Closed

completion-zsh error #1694

lixd opened this issue May 10, 2022 · 2 comments
Labels
area/shell-completion All shell completions kind/support Questions, supporting users, etc.

Comments

@lixd
Copy link

lixd commented May 10, 2022

completion display error on zsh,like this
image

all cmd are spilted by ':'.

my env

[root@kc-2]/tmp# echo $SHELL
/bin/zsh
[root@kc-2]/tmp# uname -a
Linux kc-2 5.4.156-1.el7.elrepo.x86_64 #1 SMP Tue Oct 26 11:19:09 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@kc-2 ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@kc-2]/tmp# zsh --version
zsh --version
zsh 5.0.2 (x86_64-redhat-linux-gnu)

i just do this:

$ echo "autoload -U compinit; compinit" >> ~/.zshrc
$ kcctl completion zsh > "${fpath[1]}/_kcctl"

and open a new terminal.

bytheway it works on bash.

@marckhouzam marckhouzam added the area/shell-completion All shell completions label May 10, 2022
@marckhouzam
Copy link
Collaborator

Hi @lixd. I believe this is due to the older zsh v5.0.2 version. It should not happen with zsh v5.1.

That being said, the next release of Cobra will fix this thanks to #1665.

This problem was also reported here kubernetes/kubernetes#105587 if it helps clarify the situation for you.

If you are able to test with the master branch of Cobra that would confirm that it is indeed fixed. Thanks.

@jpmcb jpmcb added the kind/support Questions, supporting users, etc. label May 10, 2022
@lixd
Copy link
Author

lixd commented May 11, 2022

@jpmcb thanks, when I build with the master branch of Cobra, it works.

@lixd lixd closed this as completed May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/shell-completion All shell completions kind/support Questions, supporting users, etc.
Projects
None yet
Development

No branches or pull requests

3 participants