-
Notifications
You must be signed in to change notification settings - Fork 282
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
Kubectl completion broken after antigen list
#603
Comments
Same question here. |
@PureWhiteWu I have |
@shane-lawrence thanks, your workaround worked for me as well |
I was seeing this with a gcloud install without antigen and I fixed it by moving the gcloud lines above the oh-my-zsh declarations - I think the kubectl plugin doesn't load if it can't find the command. Since I switched to antigen the issue has returned. |
Per ohmyzsh/ohmyzsh#6323 this can be fixed by adding this to your .zshrc:
You may have to run |
I recently ran into the same issue, and I think I've traced it back as far as I believe the cause is in FWIW, I thinks this is also related to #701, and to #698. HOWEVER, I have no intent on fixing it - this was the last straw for me and |
The problem only occurs when I'm using antigen. If I uninstall antigen and just run
autoload -U compinit; compinit
in the shell, kubectl completion works fine.Problem
kubectl tab completion sometimes gives the following error:
_kubectl:4: bad set of key/value pairs for associative array
Steps to Reproduce (with plugins)
rm ~/.zcompdump; antigen reset
.kubectl <tab>
.Steps to Reproduce (without plugins)
rm ~/.zcompdump; antigen reset
.kubectl <tab>
.antigen list
.kubectl <tab>
.Workaround
This command appears to solve the problem temporarily:
source /usr/local/share/zsh/site-functions/_kubectl
(that is actually a link to
/usr/local/Cellar/kubernetes-cli/1.8.2/share/zsh/site-functions/_kubectl
, which is identical to the output ofkubectl completion zsh
).The problem is not resolved by adding that exact source line to the end of .zshrc, and the issue will recur when a new shell is opened from the OS, but it will not recur if a new shell is opened from inside the old shell.
Environment
Software
macOS 10.13, zsh 5.4.2, kubernetes-cli 1.8.2 and antigen v2.2.1 installed with Homebrew 1.3.6.
Configuration
.zshrc
.antigenrc (with plugins)
.antigenrc (without plugins)
The text was updated successfully, but these errors were encountered: