Merge pull request #32127 from mtovmassian/fix-en-bash-alias-auto-completion
[en] Update Bash alias auto-completion
This commit is contained in:
commit
e1a1a953c6
|
|
@ -30,7 +30,7 @@ You can also use a shorthand alias for `kubectl` that also works with completion
|
|||
|
||||
```bash
|
||||
alias k=kubectl
|
||||
complete -F __start_kubectl k
|
||||
complete -o default -F __start_kubectl k
|
||||
```
|
||||
|
||||
### ZSH
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ If you have an alias for kubectl, you can extend shell completion to work with t
|
|||
|
||||
```bash
|
||||
echo 'alias k=kubectl' >>~/.bashrc
|
||||
echo 'complete -F __start_kubectl k' >>~/.bashrc
|
||||
echo 'complete -o default -F __start_kubectl k' >>~/.bashrc
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ You now have to ensure that the kubectl completion script gets sourced in all yo
|
|||
|
||||
```bash
|
||||
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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue