[zh] Update Bash alias auto-completion
parent
c55941f924
commit
63938e4cbe
|
@ -56,7 +56,7 @@ echo "source <(kubectl completion bash)" >> ~/.bashrc # 在您的 bash shell 中
|
|||
|
||||
```bash
|
||||
alias k=kubectl
|
||||
complete -F __start_kubectl k
|
||||
complete -o default -F __start_kubectl k
|
||||
```
|
||||
|
||||
### ZSH
|
||||
|
|
|
@ -86,7 +86,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 >}}
|
||||
|
|
|
@ -148,7 +148,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
|
||||
```
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Reference in New Issue