Alias for kubectl that works with completion (#12517)

* Alias for kubectl with completion.

Use a shorthand alias for `kubectl` that also works with completion. Using completion is great but typing `kubectl` each time is annoying.

* Update content/en/docs/reference/kubectl/cheatsheet.md

Co-Authored-By: jogy <johann@gyger.name>
This commit is contained in:
Johann Gyger
2019-02-17 15:15:20 +01:00
committed by Kubernetes Prow Robot
parent f0d0309086
commit 42327d8a2c
@@ -29,6 +29,13 @@ source <(kubectl completion bash) # setup autocomplete in bash into the current
echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.
```
You can also use a shorthand alias for `kubectl` that also works with completion:
```bash
alias k=kubectl
complete -F __start_kubectl k
```
### ZSH
```bash