[en] Update Bash alias auto-completion
This commit is contained in:
parent
ad6c53947a
commit
d05fb625f4
|
|
@ -30,7 +30,7 @@ You can also use a shorthand alias for `kubectl` that also works with completion
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
alias k=kubectl
|
alias k=kubectl
|
||||||
complete -F __start_kubectl k
|
complete -o default -F __start_kubectl k
|
||||||
```
|
```
|
||||||
|
|
||||||
### ZSH
|
### ZSH
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ If you have an alias for kubectl, you can extend shell completion to work with t
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
echo 'alias k=kubectl' >>~/.bashrc
|
echo 'alias k=kubectl' >>~/.bashrc
|
||||||
echo 'complete -F __start_kubectl k' >>~/.bashrc
|
echo 'complete -o default -F __start_kubectl k' >>~/.bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< note >}}
|
{{< note >}}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ You now have to ensure that the kubectl completion script gets sourced in all yo
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
echo 'alias k=kubectl' >>~/.bash_profile
|
echo 'alias k=kubectl' >>~/.bash_profile
|
||||||
echo 'complete -F __start_kubectl k' >>~/.bash_profile
|
echo 'complete -o default -F __start_kubectl k' >>~/.bash_profile
|
||||||
```
|
```
|
||||||
|
|
||||||
- If you installed kubectl with Homebrew (as explained [here](/docs/tasks/tools/install-kubectl-macos/#install-with-homebrew-on-macos)), then the kubectl completion script should already be in `/usr/local/etc/bash_completion.d/kubectl`. In that case, you don't need to do anything.
|
- If you installed kubectl with Homebrew (as explained [here](/docs/tasks/tools/install-kubectl-macos/#install-with-homebrew-on-macos)), then the kubectl completion script should already be in `/usr/local/etc/bash_completion.d/kubectl`. In that case, you don't need to do anything.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue