Merge pull request #32050 from marckhouzam/fix/zshNoAlias
No need for special handling for zsh aliases
This commit is contained in:
@@ -12,16 +12,11 @@ To do so in all your shell sessions, add the following to your `~/.zshrc` file:
|
|||||||
source <(kubectl completion zsh)
|
source <(kubectl completion zsh)
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have an alias for kubectl, you can extend shell completion to work with that alias:
|
If you have an alias for kubectl, kubectl autocompletion will automatically work with it.
|
||||||
|
|
||||||
```zsh
|
|
||||||
echo 'alias k=kubectl' >>~/.zshrc
|
|
||||||
echo 'compdef __start_kubectl k' >>~/.zshrc
|
|
||||||
```
|
|
||||||
|
|
||||||
After reloading your shell, kubectl autocompletion should be working.
|
After reloading your shell, kubectl autocompletion should be working.
|
||||||
|
|
||||||
If you get an error like `complete:13: command not found: compdef`, then add the following to the beginning of your `~/.zshrc` file:
|
If you get an error like `2: command not found: compdef`, then add the following to the beginning of your `~/.zshrc` file:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
|
|||||||
Reference in New Issue
Block a user