Update optional-kubectl-configs-bash-mac.md
parent
fc70f1b3cf
commit
94365a01e1
|
@ -12,7 +12,7 @@ headless: true
|
|||
<!--
|
||||
### Introduction
|
||||
-->
|
||||
### 简介
|
||||
### 简介 {#introduction}
|
||||
|
||||
<!--
|
||||
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。
|
||||
必须为它配备 **bash-completion v2** 和 **Bash 4.1+**。
|
||||
有鉴于此,为了在 macOS 上使用 kubectl 补全功能,你必须要安装和使用 Bash 4.1+
|
||||
([*说明*](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba))。
|
||||
后续说明假定你用的是 Bash 4.1+(也就是 Bash 4.1 或更新的版本)
|
||||
([**说明**](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba))。
|
||||
后续说明假定你用的是 Bash 4.1+(也就是 Bash 4.1 或更新的版本)。
|
||||
{{< /warning >}}
|
||||
|
||||
<!--
|
||||
### Upgrade Bash
|
||||
-->
|
||||
### 升级 Bash
|
||||
### 升级 Bash {#upgrade-bash}
|
||||
|
||||
<!--
|
||||
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
|
||||
-->
|
||||
### 安装 bash-completion
|
||||
### 安装 bash-completion {#install-bash-completion}
|
||||
|
||||
|
||||
{{< note >}}
|
||||
|
@ -116,7 +116,7 @@ Reload your shell and verify that bash-completion v2 is correctly installed with
|
|||
<!--
|
||||
### 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:
|
||||
|
|
Loading…
Reference in New Issue