<p>I installed kubectl and tried enable shell autocompletion for zsh.
When I'm using <code>kubectl</code> autocompletion works fine. Howewer when I'm trying use autocompletion with alias <code>k</code> then shell return me</p>
<pre><code>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
</code></pre>
<p>In my <code>.zshrc</code> file I have:</p>
<pre><code>source &lt;(kubectl completion zsh)
alias k=kubectl
compdef __start_kubectl k
</code></pre>

<p>add the following to the beginning of your ~/.zshrc file:</p>
<pre><code>autoload -Uz compinit
compinit
</code></pre>
<p>then restart your terminal.</p>
