Update optional-kubectl-configs-bash-mac.md

pull/35318/head
yanrong.shi 2022-07-25 00:59:51 +08:00
parent fc70f1b3cf
commit 94365a01e1
1 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@ headless: true
<!-- <!--
### Introduction ### Introduction
--> -->
### 简介 ### 简介 {#introduction}
<!-- <!--
The kubectl completion script for Bash can be generated with `kubectl completion bash`. Sourcing this script in your shell enables kubectl completion. The kubectl completion script for Bash can be generated with `kubectl completion bash`. Sourcing this script in your shell enables kubectl completion.
@ -33,14 +33,14 @@ bash-completion 有两个版本v1 和 v2。v1 对应 Bash3.2(也是 macOS
kubectl 的补全脚本**无法适配** bash-completion v1 和 Bash 3.2。 kubectl 的补全脚本**无法适配** bash-completion v1 和 Bash 3.2。
必须为它配备 **bash-completion v2****Bash 4.1+** 必须为它配备 **bash-completion v2****Bash 4.1+**
有鉴于此,为了在 macOS 上使用 kubectl 补全功能,你必须要安装和使用 Bash 4.1+ 有鉴于此,为了在 macOS 上使用 kubectl 补全功能,你必须要安装和使用 Bash 4.1+
([*说明*](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba)) [**说明**](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba)
后续说明假定你用的是 Bash 4.1+(也就是 Bash 4.1 或更新的版本) 后续说明假定你用的是 Bash 4.1+(也就是 Bash 4.1 或更新的版本)
{{< /warning >}} {{< /warning >}}
<!-- <!--
### Upgrade Bash ### Upgrade Bash
--> -->
### 升级 Bash ### 升级 Bash {#upgrade-bash}
<!-- <!--
The instructions here assume you use Bash 4.1+. You can check your Bash's version by running: The instructions here assume you use Bash 4.1+. You can check your Bash's version by running:
@ -77,7 +77,7 @@ Homebrew 通常把它安装为 `/usr/local/bin/bash`。
<!-- <!--
### Install bash-completion ### Install bash-completion
--> -->
### 安装 bash-completion ### 安装 bash-completion {#install-bash-completion}
{{< note >}} {{< note >}}
@ -116,7 +116,7 @@ Reload your shell and verify that bash-completion v2 is correctly installed with
<!-- <!--
### Enable kubectl autocompletion ### Enable kubectl autocompletion
--> -->
### 启用 kubectl 自动补全功能 ### 启用 kubectl 自动补全功能 {#enable-kubectl-autocompletion}
<!-- <!--
You now have to ensure that the kubectl completion script gets sourced in all your shell sessions. There are multiple ways to achieve this: You now have to ensure that the kubectl completion script gets sourced in all your shell sessions. There are multiple ways to achieve this: