I installed kubectl and tried enable shell autocompletion for zsh.
When I'm using kubectl
autocompletion works fine. Howewer when I'm trying use autocompletion with alias k
then shell return me
k g...(eval):1: command not found: __start_kubectl 8:45
(eval):1: command not found: __start_kubectl
(eval):1: command not found: __start_kubectl
In my .zshrc
file I have:
source <(kubectl completion zsh)
alias k=kubectl
compdef __start_kubectl k