Merge pull request #32127 from mtovmassian/fix-en-bash-alias-auto-completion

[en] Update Bash alias auto-completion
This commit is contained in:
Kubernetes Prow Robot 2022-06-13 21:11:34 -07:00 committed by GitHub
commit e1a1a953c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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 >}}

View File

@ -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.