Merge pull request #34325 from mtovmassian/fix-zh-bash-alias-auto-completion
[zh] Update Bash alias auto-completion
This commit is contained in:
@@ -56,7 +56,7 @@ echo "source <(kubectl completion bash)" >> ~/.bashrc # 在您的 bash shell 中
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
alias k=kubectl
|
alias k=kubectl
|
||||||
complete -F __start_kubectl k
|
complete -o default -F __start_kubectl k
|
||||||
```
|
```
|
||||||
|
|
||||||
### ZSH
|
### ZSH
|
||||||
|
|||||||
@@ -86,7 +86,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 >}}
|
||||||
|
|||||||
@@ -148,7 +148,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
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
Reference in New Issue
Block a user