Update cheatsheet.md (#19039)
Replaced 'if' ZSH kubectl autocomplete with a more compact form
This commit is contained in:
parent
e0a03c0ebd
commit
a869f00509
|
@ -42,7 +42,7 @@ complete -F __start_kubectl k
|
|||
|
||||
```bash
|
||||
source <(kubectl completion zsh) # setup autocomplete in zsh into the current shell
|
||||
echo "if [ $commands[kubectl] ]; then source <(kubectl completion zsh); fi" >> ~/.zshrc # add autocomplete permanently to your zsh shell
|
||||
echo "[[ $commands[kubectl] ]] && source <(kubectl completion zsh)" >> ~/.zshrc # add autocomplete permanently to your zsh shell
|
||||
```
|
||||
|
||||
## Kubectl Context and Configuration
|
||||
|
|
Loading…
Reference in New Issue