From 63938e4cbe55988869c3def12070c3a7282588b9 Mon Sep 17 00:00:00 2001 From: Martin Tovmassian Date: Thu, 16 Jun 2022 12:22:31 +0200 Subject: [PATCH] [zh] Update Bash alias auto-completion --- content/zh-cn/docs/reference/kubectl/cheatsheet.md | 2 +- .../tasks/tools/included/optional-kubectl-configs-bash-linux.md | 2 +- .../tasks/tools/included/optional-kubectl-configs-bash-mac.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/zh-cn/docs/reference/kubectl/cheatsheet.md b/content/zh-cn/docs/reference/kubectl/cheatsheet.md index a55fbf4b38..92ff6e0eea 100644 --- a/content/zh-cn/docs/reference/kubectl/cheatsheet.md +++ b/content/zh-cn/docs/reference/kubectl/cheatsheet.md @@ -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 diff --git a/content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md b/content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md index 62046d0357..eba8ea68cc 100644 --- a/content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md +++ b/content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md @@ -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 >}} diff --git a/content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-mac.md b/content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-mac.md index 225492631c..b2c17b21f1 100644 --- a/content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-mac.md +++ b/content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-mac.md @@ -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 ```