mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-02 20:04:35 +08:00
docs: rename KUBE variables to KUBE_PS1 to inherit plugin convention
This commit is contained in:
parent
f66a13f88c
commit
c32dc46b03
@ -127,7 +127,7 @@ The default prompt layout is:
|
||||
```sh
|
||||
(<symbol>|<context>:<namespace>)
|
||||
```
|
||||
You can enable kube environment context (like dev/staging/test/prod) via `KUBE_ENV_CTX_ENABLE=true`. In this case, the layout will be:
|
||||
You can enable kube environment context (like dev/staging/test/prod) via `KUBE_PS1_ENV_CTX_ENABLE=true`. In this case, the layout will be:
|
||||
```sh
|
||||
[<kube-environment>] (<symbol>|<context>:<namespace>)
|
||||
```
|
||||
@ -212,18 +212,18 @@ In case you would like to have more control over kube environment context, you c
|
||||
|
||||
| Variable | Default | Meaning |
|
||||
| :------- | :-----: | ------- |
|
||||
| `KUBE_ENV_CTX_ENABLE` | `false` | Extract environment identifiers from context and display them as a separate block in square brackets, e.g `testing-mycluster` becomes `[test] mycluster` |
|
||||
| `KUBE_ENV_PADDING` | one space | Padding (spaces or characters) added around the environment block |
|
||||
| `KUBE_ENV_OPEN_SYMBOL` | `[` | Opening symbol used for the environment block |
|
||||
| `KUBE_ENV_CLOSE_SYMBOL` | `]` | Closing symbol used for the environment block |
|
||||
| `KUBE_ENV_PROD_LABEL` | `prod` | Set default production label |
|
||||
| `KUBE_ENV_STG_LABEL` | `stag` | Set default staging label |
|
||||
| `KUBE_ENV_TEST_LABEL` | `test` | Set default testing label |
|
||||
| `KUBE_ENV_DEV_LABEL` | `dev` | Set default developing label |
|
||||
| `KUBE_ENV_PROD_RE` | `(production\|prod)-` | Regex used to detect production in the context name |
|
||||
| `KUBE_ENV_STG_RE` | `(staging\|stg)-` | Regex used to detect staging in the context name |
|
||||
| `KUBE_ENV_TEST_RE` | `(testing\|test)-` | Regex used to detect test in the context name |
|
||||
| `KUBE_ENV_DEV_RE` | `develop-` | Regex used to detect development in the context name|
|
||||
| `KUBE_PS1_ENV_CTX_ENABLE` | `false` | Extract environment identifiers from context and display them as a separate block in square brackets, e.g `testing-mycluster` becomes `[test] mycluster` |
|
||||
| `KUBE_PS1_ENV_PADDING` | one space | Padding (spaces or characters) added around the environment block |
|
||||
| `KUBE_PS1_ENV_OPEN_SYMBOL` | `[` | Opening symbol used for the environment block |
|
||||
| `KUBE_PS1_ENV_CLOSE_SYMBOL` | `]` | Closing symbol used for the environment block |
|
||||
| `KUBE_PS1_ENV_PROD_LABEL` | `prod` | Set default production label |
|
||||
| `KUBE_PS1_ENV_STG_LABEL` | `stag` | Set default staging label |
|
||||
| `KUBE_PS1_ENV_TEST_LABEL` | `test` | Set default testing label |
|
||||
| `KUBE_PS1_ENV_DEV_LABEL` | `dev` | Set default developing label |
|
||||
| `KUBE_PS1_ENV_PROD_RE` | `(production\|prod)-` | Regex used to detect production in the context name |
|
||||
| `KUBE_PS1_ENV_STG_RE` | `(staging\|stg)-` | Regex used to detect staging in the context name |
|
||||
| `KUBE_PS1_ENV_TEST_RE` | `(testing\|test)-` | Regex used to detect test in the context name |
|
||||
| `KUBE_PS1_ENV_DEV_RE` | `develop-` | Regex used to detect development in the context name|
|
||||
|
||||
To disable a feature, set it to an empty string:
|
||||
|
||||
@ -248,14 +248,14 @@ Blue was used for the default symbol to match the Kubernetes color as closely
|
||||
as possible. Red was chosen as the context name to stand out, and cyan for the
|
||||
namespace.
|
||||
|
||||
If `KUBE_ENV_CTX_ENABLE` is set to `true`, you can also adjust:
|
||||
If `KUBE_PS1_ENV_CTX_ENABLE` is set to `true`, you can also adjust:
|
||||
|
||||
| Variable | Default | Meaning |
|
||||
| :------- | :-----: | ------- |
|
||||
| `KUBE_ENV_PROD_COLOR` | `red` | Set default color of the production environment |
|
||||
| `KUBE_ENV_STG_COLOR` | `yellow` | Set default color of the staging environment |
|
||||
| `KUBE_ENV_TEST_COLOR` | `green` | Set default color of the testing environment |
|
||||
| `KUBE_ENV_DEV_COLOR` | `blue` | Set default color of the development environment |
|
||||
| `KUBE_PS1_ENV_PROD_COLOR` | `red` | Set default color of the production environment |
|
||||
| `KUBE_PS1_ENV_STG_COLOR` | `yellow` | Set default color of the staging environment |
|
||||
| `KUBE_PS1_ENV_TEST_COLOR` | `green` | Set default color of the testing environment |
|
||||
| `KUBE_PS1_ENV_DEV_COLOR` | `blue` | Set default color of the development environment |
|
||||
|
||||
Set the variable to an empty string if you do not want color for each
|
||||
prompt section:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user