From 259ee260719ef742ace5f5e323df3588144ab25f Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 20:27:33 +0200 Subject: [PATCH 01/14] feat(kube-ps1): add environment indicator to the prompt layout --- plugins/kube-ps1/README.md | 30 +++++++++++++++ plugins/kube-ps1/kube-ps1.plugin.zsh | 56 ++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index ef6d781ad..b66ad5da1 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -127,6 +127,10 @@ The default prompt layout is: ```sh (|:) ``` +You can enable kube environment context (like dev/staging/test/prod) via `KUBE_ENV_CTX_ENABLE=true`. In this case, the layout will be: +```sh +[] (|:) +``` If the current-context is not set, kube-ps1 will return the following: @@ -204,6 +208,23 @@ the following variables: | `KUBE_PS1_CTX_COLOR_FUNCTION` | No default, must be user supplied | Function to customize context color based on context name | | `KUBE_PS1_HIDE_IF_NOCONTEXT` | `false` | Hide the kube-ps1 prompt if no context is set | +In case you would like to have more control over kube environment context, you can tackle: + +| Variable | Default | Meaning | +| :------- | :-----: | ------- | +| `KUBE_ENV_CTX_ENABLE` | `false` | Extract environment identifiers from `kube_ps1` context and display them as a separate block in square brackets | +| `KUBE_ENV_PADDING` | ` ` | Padding (spaces or characters) added around the environment block | +| `KUBE_ENV_OPEN_SYMBOL` | `[` | Opening symbol used for the environment block | +| `KUBE_ENV_CLOSE_SYMBOL` | `]${KUBE_ENV_PADDING}` | Closing symbol used for the environment block | +| `KUBE_ENV_PROD` | `prod` | Set default production label | +| `KUBE_ENV_STG` | `stag` | Set default staging label | +| `KUBE_ENV_TEST` | `test` | Set default testing label | +| `KUBE_ENV_DEV` | `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| + To disable a feature, set it to an empty string: ```sh @@ -223,6 +244,15 @@ The default colors are set with the following variables: | `KUBE_PS1_NS_COLOR` | `cyan` | Set default color of the namespace | | `KUBE_PS1_BG_COLOR` | `null` | Set default color of the prompt background | +If `KUBE_ENV_CTX_ENABLE` 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 | + 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. diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index 9dcd6da44..943868b11 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -36,6 +36,28 @@ KUBE_PS1_SUFFIX="${KUBE_PS1_SUFFIX-)}" KUBE_PS1_HIDE_IF_NOCONTEXT="${KUBE_PS1_HIDE_IF_NOCONTEXT:-false}" +# Kube environment variables +KUBE_ENV_CTX_ENABLE="${KUBE_ENV_CTX_ENABLE:-false}" +KUBE_ENV_PADDING="${KUBE_ENV_PADDING:- }" + +KUBE_ENV_OPEN_SYMBOL="${KUBE_ENV_OPEN_SYMBOL:-${KUBE_ENV_PADDING}[}" +KUBE_ENV_CLOSE_SYMBOL="${KUBE_ENV_CLOSE_SYMBOL:-]${KUBE_ENV_PADDING}}" + +KUBE_ENV_PROD_COLOR="${KUBE_ENV_PROD_COLOR:-red}" +KUBE_ENV_STG_COLOR="${KUBE_ENV_STG_COLOR:-yellow}" +KUBE_ENV_TEST_COLOR="${KUBE_ENV_TEST_COLOR:-green}" +KUBE_ENV_DEV_COLOR="${KUBE_ENV_DEV_COLOR:-blue}" + +KUBE_ENV_PROD="${KUBE_ENV_PROD:-prod}" +KUBE_ENV_STG="${KUBE_ENV_STG:-stag}" +KUBE_ENV_TEST="${KUBE_ENV_TEST:-test}" +KUBE_ENV_DEV="${KUBE_ENV_DEV:-dev}" + +KUBE_ENV_PROD_RE="${KUBE_ENV_PROD_RE:-(production|prod)-}" +KUBE_ENV_STG_RE="${KUBE_ENV_STG_RE:-(staging|stg)-}" +KUBE_ENV_TEST_RE="${KUBE_ENV_TEST_RE:-(testing|test)-}" +KUBE_ENV_DEV_RE="${KUBE_ENV_DEV_RE:-develop-}" + _KUBE_PS1_KUBECONFIG_CACHE="${KUBECONFIG}" _KUBE_PS1_DISABLE_PATH="${HOME}/.kube/kube-ps1/disabled" _KUBE_PS1_LAST_TIME=0 @@ -316,6 +338,35 @@ _kube_ps1_get_context_ns() { _kube_ps1_get_ns } +_kube_ps1_cut_context() { + local pattern="$1" + KUBE_PS1_CONTEXT="$(sed -E "s/${pattern}//g" <<< "${KUBE_PS1_CONTEXT}")" +} + +_kube_ps1_set_env_ctx() { + local ctx_color env_label + + if grep -qE "${KUBE_ENV_PROD_RE}" <<< "${KUBE_PS1_CONTEXT}"; then + _kube_ps1_cut_context "${KUBE_ENV_PROD_RE}" + ctx_color=$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}") + env_label=${KUBE_ENV_PROD} + elif grep -qE "${KUBE_ENV_STG_RE}" <<< "${KUBE_PS1_CONTEXT}"; then + _kube_ps1_cut_context "${KUBE_ENV_PROD_RE}" + ctx_color=$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}") + env_label=${KUBE_ENV_PROD} + elif grep -qE "${KUBE_ENV_TEST_RE}" <<< "${KUBE_PS1_CONTEXT}"; then + _kube_ps1_cut_context "${KUBE_ENV_TEST_RE}" + ctx_color=$(_kube_ps1_color_fg "${KUBE_ENV_TEST_COLOR}") + env_label=${KUBE_ENV_TEST} + elif grep -qE "${KUBE_ENV_DEV_RE}" <<< "${KUBE_PS1_CONTEXT}"; then + _kube_ps1_cut_context "${KUBE_ENV_DEV_RE}" + ctx_color=$(_kube_ps1_color_fg "${KUBE_ENV_DEV_COLOR}") + env_label=${KUBE_ENV_DEV} + fi + + KUBE_PS1+="${KUBE_ENV_OPEN_SYMBOL}${ctx_color}${env_label}${KUBE_PS1_RESET_COLOR}${KUBE_ENV_CLOSE_SYMBOL}" +} + # Set kube-ps1 shell defaults _kube_ps1_init @@ -392,6 +443,11 @@ kube_ps1() { # Background Color [[ -n "${KUBE_PS1_BG_COLOR}" ]] && KUBE_PS1+="$(_kube_ps1_color_bg "${KUBE_PS1_BG_COLOR}")" + # Context Env + if [[ -n "${KUBE_ENV_CTX_ENABLE}" ]] && [[ "${KUBE_ENV_CTX_ENABLE}" == true ]]; then + _kube_ps1_set_env_ctx + fi + # Prefix if [[ -z "${KUBE_PS1_PREFIX_COLOR:-}" ]] && [[ -n "${KUBE_PS1_PREFIX}" ]]; then KUBE_PS1+="${KUBE_PS1_PREFIX}" From 375293f612d8a0bd4d3995d44837c2d68f167ed3 Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 20:49:02 +0200 Subject: [PATCH 02/14] chore: add missing quotes --- plugins/kube-ps1/kube-ps1.plugin.zsh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index 943868b11..5b9a61bc4 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -348,20 +348,20 @@ _kube_ps1_set_env_ctx() { if grep -qE "${KUBE_ENV_PROD_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_PROD_RE}" - ctx_color=$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}") - env_label=${KUBE_ENV_PROD} + ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}")" + env_label="${KUBE_ENV_PROD}" elif grep -qE "${KUBE_ENV_STG_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_PROD_RE}" - ctx_color=$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}") - env_label=${KUBE_ENV_PROD} + ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}")" + env_label="${KUBE_ENV_PROD}" elif grep -qE "${KUBE_ENV_TEST_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_TEST_RE}" - ctx_color=$(_kube_ps1_color_fg "${KUBE_ENV_TEST_COLOR}") - env_label=${KUBE_ENV_TEST} + ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_TEST_COLOR}")" + env_label="${KUBE_ENV_TEST}" elif grep -qE "${KUBE_ENV_DEV_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_DEV_RE}" - ctx_color=$(_kube_ps1_color_fg "${KUBE_ENV_DEV_COLOR}") - env_label=${KUBE_ENV_DEV} + ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_DEV_COLOR}")" + env_label="${KUBE_ENV_DEV}" fi KUBE_PS1+="${KUBE_ENV_OPEN_SYMBOL}${ctx_color}${env_label}${KUBE_PS1_RESET_COLOR}${KUBE_ENV_CLOSE_SYMBOL}" @@ -494,3 +494,4 @@ kube_ps1() { echo "${KUBE_PS1}" } + From e373869348645cd0e1478b7c2bd4c38f48dfa986 Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 20:50:21 +0200 Subject: [PATCH 03/14] chore: remove new line at the EOF --- plugins/kube-ps1/kube-ps1.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index 5b9a61bc4..dcfc4b6ca 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -494,4 +494,3 @@ kube_ps1() { echo "${KUBE_PS1}" } - From d6faa296d919d466a467da8f5e29d5957fa8038f Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 21:05:27 +0200 Subject: [PATCH 04/14] docs: update README.md --- plugins/kube-ps1/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index b66ad5da1..ab83f4604 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -212,10 +212,10 @@ 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 `kube_ps1` context and display them as a separate block in square brackets | +| `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` | ` ` | Padding (spaces or characters) added around the environment block | | `KUBE_ENV_OPEN_SYMBOL` | `[` | Opening symbol used for the environment block | -| `KUBE_ENV_CLOSE_SYMBOL` | `]${KUBE_ENV_PADDING}` | Closing symbol used for the environment block | +| `KUBE_ENV_CLOSE_SYMBOL` | `]` | Closing symbol used for the environment block | | `KUBE_ENV_PROD` | `prod` | Set default production label | | `KUBE_ENV_STG` | `stag` | Set default staging label | | `KUBE_ENV_TEST` | `test` | Set default testing label | @@ -244,7 +244,11 @@ The default colors are set with the following variables: | `KUBE_PS1_NS_COLOR` | `cyan` | Set default color of the namespace | | `KUBE_PS1_BG_COLOR` | `null` | Set default color of the prompt background | -If `KUBE_ENV_CTX_ENABLE` set to `true`, you can also adjust: +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: | Variable | Default | Meaning | | :------- | :-----: | ------- | @@ -253,10 +257,6 @@ If `KUBE_ENV_CTX_ENABLE` set to `true`, you can also adjust: | `KUBE_ENV_TEST_COLOR` | `green` | Set default color of the testing environment | | `KUBE_ENV_DEV_COLOR` | `blue` | Set default color of the development environment | -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. - Set the variable to an empty string if you do not want color for each prompt section: From 8c35cc24d6e91286cfde6f8f43fea5cd55ddc222 Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 21:06:53 +0200 Subject: [PATCH 05/14] docs: update README.md --- plugins/kube-ps1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index ab83f4604..b47743c65 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -213,7 +213,7 @@ 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` | ` ` | Padding (spaces or characters) added around the environment block | +| `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` | `prod` | Set default production label | From d6bce941ee67a14b73a000e3f4167ece85a0dce7 Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 21:10:00 +0200 Subject: [PATCH 06/14] docs: update README.md --- plugins/kube-ps1/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index b47743c65..da375f379 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -213,16 +213,16 @@ 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_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` | `prod` | Set default production label | | `KUBE_ENV_STG` | `stag` | Set default staging label | | `KUBE_ENV_TEST` | `test` | Set default testing label | | `KUBE_ENV_DEV` | `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_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| To disable a feature, set it to an empty string: From 1aa896ebe310433e9cf120a46d53ef374cfef5e0 Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 21:16:15 +0200 Subject: [PATCH 07/14] chore: rename gloabal variables --- plugins/kube-ps1/README.md | 8 ++++---- plugins/kube-ps1/kube-ps1.plugin.zsh | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index da375f379..e00e8b972 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -216,10 +216,10 @@ In case you would like to have more control over kube environment context, you c | `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` | `prod` | Set default production label | -| `KUBE_ENV_STG` | `stag` | Set default staging label | -| `KUBE_ENV_TEST` | `test` | Set default testing label | -| `KUBE_ENV_DEV` | `dev` | Set default developing label | +| `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 | diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index dcfc4b6ca..6b4c83182 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -48,10 +48,10 @@ KUBE_ENV_STG_COLOR="${KUBE_ENV_STG_COLOR:-yellow}" KUBE_ENV_TEST_COLOR="${KUBE_ENV_TEST_COLOR:-green}" KUBE_ENV_DEV_COLOR="${KUBE_ENV_DEV_COLOR:-blue}" -KUBE_ENV_PROD="${KUBE_ENV_PROD:-prod}" -KUBE_ENV_STG="${KUBE_ENV_STG:-stag}" -KUBE_ENV_TEST="${KUBE_ENV_TEST:-test}" -KUBE_ENV_DEV="${KUBE_ENV_DEV:-dev}" +KUBE_ENV_PROD_LABEL="${KUBE_ENV_PROD_LABEL:-prod}" +KUBE_ENV_STG_LABEL="${KUBE_ENV_STG_LABEL:-stag}" +KUBE_ENV_TEST_LABEL="${KUBE_ENV_TEST_LABEL:-test}" +KUBE_ENV_DEV_LABEL="${KUBE_ENV_DEV_LABEL:-dev}" KUBE_ENV_PROD_RE="${KUBE_ENV_PROD_RE:-(production|prod)-}" KUBE_ENV_STG_RE="${KUBE_ENV_STG_RE:-(staging|stg)-}" @@ -349,19 +349,19 @@ _kube_ps1_set_env_ctx() { if grep -qE "${KUBE_ENV_PROD_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_PROD_RE}" ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}")" - env_label="${KUBE_ENV_PROD}" + env_label="${KUBE_ENV_PROD_LABEL}" elif grep -qE "${KUBE_ENV_STG_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_PROD_RE}" ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}")" - env_label="${KUBE_ENV_PROD}" + env_label="${KUBE_ENV_PROD_LABEL}" elif grep -qE "${KUBE_ENV_TEST_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_TEST_RE}" ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_TEST_COLOR}")" - env_label="${KUBE_ENV_TEST}" + env_label="${KUBE_ENV_TEST_LABEL}" elif grep -qE "${KUBE_ENV_DEV_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_DEV_RE}" ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_DEV_COLOR}")" - env_label="${KUBE_ENV_DEV}" + env_label="${KUBE_ENV_DEV_LABEL}" fi KUBE_PS1+="${KUBE_ENV_OPEN_SYMBOL}${ctx_color}${env_label}${KUBE_PS1_RESET_COLOR}${KUBE_ENV_CLOSE_SYMBOL}" From 9ff3be7dadfd57e44f141c6187bcbddbd8ebfbfe Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 21:18:43 +0200 Subject: [PATCH 08/14] fix: correct variable names --- plugins/kube-ps1/kube-ps1.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index 6b4c83182..2367cb8fd 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -351,9 +351,9 @@ _kube_ps1_set_env_ctx() { ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}")" env_label="${KUBE_ENV_PROD_LABEL}" elif grep -qE "${KUBE_ENV_STG_RE}" <<< "${KUBE_PS1_CONTEXT}"; then - _kube_ps1_cut_context "${KUBE_ENV_PROD_RE}" - ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}")" - env_label="${KUBE_ENV_PROD_LABEL}" + _kube_ps1_cut_context "${KUBE_ENV_STG_RE}" + ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_STG_COLOR}")" + env_label="${KUBE_ENV_STG_LABEL}" elif grep -qE "${KUBE_ENV_TEST_RE}" <<< "${KUBE_PS1_CONTEXT}"; then _kube_ps1_cut_context "${KUBE_ENV_TEST_RE}" ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_TEST_COLOR}")" From f66a13f88cb380c2d4c571a31ac3389151948d80 Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 23:30:11 +0200 Subject: [PATCH 09/14] style: rename KUBE variables to KUBE_PS1 to inherit plugin convention --- plugins/kube-ps1/kube-ps1.plugin.zsh | 68 ++++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index 2367cb8fd..00824ad93 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -37,26 +37,26 @@ KUBE_PS1_SUFFIX="${KUBE_PS1_SUFFIX-)}" KUBE_PS1_HIDE_IF_NOCONTEXT="${KUBE_PS1_HIDE_IF_NOCONTEXT:-false}" # Kube environment variables -KUBE_ENV_CTX_ENABLE="${KUBE_ENV_CTX_ENABLE:-false}" -KUBE_ENV_PADDING="${KUBE_ENV_PADDING:- }" +KUBE_PS1_ENV_CTX_ENABLE="${KUBE_PS1_ENV_CTX_ENABLE:-false}" +KUBE_PS1_ENV_PADDING="${KUBE_PS1_ENV_PADDING:- }" -KUBE_ENV_OPEN_SYMBOL="${KUBE_ENV_OPEN_SYMBOL:-${KUBE_ENV_PADDING}[}" -KUBE_ENV_CLOSE_SYMBOL="${KUBE_ENV_CLOSE_SYMBOL:-]${KUBE_ENV_PADDING}}" +KUBE_PS1_ENV_OPEN_SYMBOL="${KUBE_PS1_ENV_OPEN_SYMBOL:-${KUBE_PS1_ENV_PADDING}[}" +KUBE_PS1_ENV_CLOSE_SYMBOL="${KUBE_PS1_ENV_CLOSE_SYMBOL:-]${KUBE_PS1_ENV_PADDING}}" -KUBE_ENV_PROD_COLOR="${KUBE_ENV_PROD_COLOR:-red}" -KUBE_ENV_STG_COLOR="${KUBE_ENV_STG_COLOR:-yellow}" -KUBE_ENV_TEST_COLOR="${KUBE_ENV_TEST_COLOR:-green}" -KUBE_ENV_DEV_COLOR="${KUBE_ENV_DEV_COLOR:-blue}" +KUBE_PS1_ENV_PROD_COLOR="${KUBE_PS1_ENV_PROD_COLOR:-red}" +KUBE_PS1_ENV_STG_COLOR="${KUBE_PS1_ENV_STG_COLOR:-yellow}" +KUBE_PS1_ENV_TEST_COLOR="${KUBE_PS1_ENV_TEST_COLOR:-green}" +KUBE_PS1_ENV_DEV_COLOR="${KUBE_PS1_ENV_DEV_COLOR:-blue}" -KUBE_ENV_PROD_LABEL="${KUBE_ENV_PROD_LABEL:-prod}" -KUBE_ENV_STG_LABEL="${KUBE_ENV_STG_LABEL:-stag}" -KUBE_ENV_TEST_LABEL="${KUBE_ENV_TEST_LABEL:-test}" -KUBE_ENV_DEV_LABEL="${KUBE_ENV_DEV_LABEL:-dev}" +KUBE_PS1_ENV_PROD_LABEL="${KUBE_PS1_ENV_PROD_LABEL:-prod}" +KUBE_PS1_ENV_STG_LABEL="${KUBE_PS1_ENV_STG_LABEL:-stag}" +KUBE_PS1_ENV_TEST_LABEL="${KUBE_PS1_ENV_TEST_LABEL:-test}" +KUBE_PS1_ENV_DEV_LABEL="${KUBE_PS1_ENV_DEV_LABEL:-dev}" -KUBE_ENV_PROD_RE="${KUBE_ENV_PROD_RE:-(production|prod)-}" -KUBE_ENV_STG_RE="${KUBE_ENV_STG_RE:-(staging|stg)-}" -KUBE_ENV_TEST_RE="${KUBE_ENV_TEST_RE:-(testing|test)-}" -KUBE_ENV_DEV_RE="${KUBE_ENV_DEV_RE:-develop-}" +KUBE_PS1_ENV_PROD_RE="${KUBE_PS1_ENV_PROD_RE:-(production|prod)-}" +KUBE_PS1_ENV_STG_RE="${KUBE_PS1_ENV_STG_RE:-(staging|stg)-}" +KUBE_PS1_ENV_TEST_RE="${KUBE_PS1_ENV_TEST_RE:-(testing|test)-}" +KUBE_PS1_ENV_DEV_RE="${KUBE_PS1_ENV_DEV_RE:-develop-}" _KUBE_PS1_KUBECONFIG_CACHE="${KUBECONFIG}" _KUBE_PS1_DISABLE_PATH="${HOME}/.kube/kube-ps1/disabled" @@ -346,25 +346,25 @@ _kube_ps1_cut_context() { _kube_ps1_set_env_ctx() { local ctx_color env_label - if grep -qE "${KUBE_ENV_PROD_RE}" <<< "${KUBE_PS1_CONTEXT}"; then - _kube_ps1_cut_context "${KUBE_ENV_PROD_RE}" - ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_PROD_COLOR}")" - env_label="${KUBE_ENV_PROD_LABEL}" - elif grep -qE "${KUBE_ENV_STG_RE}" <<< "${KUBE_PS1_CONTEXT}"; then - _kube_ps1_cut_context "${KUBE_ENV_STG_RE}" - ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_STG_COLOR}")" - env_label="${KUBE_ENV_STG_LABEL}" - elif grep -qE "${KUBE_ENV_TEST_RE}" <<< "${KUBE_PS1_CONTEXT}"; then - _kube_ps1_cut_context "${KUBE_ENV_TEST_RE}" - ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_TEST_COLOR}")" - env_label="${KUBE_ENV_TEST_LABEL}" - elif grep -qE "${KUBE_ENV_DEV_RE}" <<< "${KUBE_PS1_CONTEXT}"; then - _kube_ps1_cut_context "${KUBE_ENV_DEV_RE}" - ctx_color="$(_kube_ps1_color_fg "${KUBE_ENV_DEV_COLOR}")" - env_label="${KUBE_ENV_DEV_LABEL}" + if grep -qE "${KUBE_PS1_ENV_PROD_RE}" <<< "${KUBE_PS1_CONTEXT}"; then + _kube_ps1_cut_context "${KUBE_PS1_ENV_PROD_RE}" + ctx_color="$(_kube_ps1_color_fg "${KUBE_PS1_ENV_PROD_COLOR}")" + env_label="${KUBE_PS1_ENV_PROD_LABEL}" + elif grep -qE "${KUBE_PS1_ENV_STG_RE}" <<< "${KUBE_PS1_CONTEXT}"; then + _kube_ps1_cut_context "${KUBE_PS1_ENV_STG_RE}" + ctx_color="$(_kube_ps1_color_fg "${KUBE_PS1_ENV_STG_COLOR}")" + env_label="${KUBE_PS1_ENV_STG_LABEL}" + elif grep -qE "${KUBE_PS1_ENV_TEST_RE}" <<< "${KUBE_PS1_CONTEXT}"; then + _kube_ps1_cut_context "${KUBE_PS1_ENV_TEST_RE}" + ctx_color="$(_kube_ps1_color_fg "${KUBE_PS1_ENV_TEST_COLOR}")" + env_label="${KUBE_PS1_ENV_TEST_LABEL}" + elif grep -qE "${KUBE_PS1_ENV_DEV_RE}" <<< "${KUBE_PS1_CONTEXT}"; then + _kube_ps1_cut_context "${KUBE_PS1_ENV_DEV_RE}" + ctx_color="$(_kube_ps1_color_fg "${KUBE_PS1_ENV_DEV_COLOR}")" + env_label="${KUBE_PS1_ENV_DEV_LABEL}" fi - KUBE_PS1+="${KUBE_ENV_OPEN_SYMBOL}${ctx_color}${env_label}${KUBE_PS1_RESET_COLOR}${KUBE_ENV_CLOSE_SYMBOL}" + KUBE_PS1+="${KUBE_PS1_ENV_OPEN_SYMBOL}${ctx_color}${env_label}${KUBE_PS1_RESET_COLOR}${KUBE_PS1_ENV_CLOSE_SYMBOL}" } # Set kube-ps1 shell defaults @@ -444,7 +444,7 @@ kube_ps1() { [[ -n "${KUBE_PS1_BG_COLOR}" ]] && KUBE_PS1+="$(_kube_ps1_color_bg "${KUBE_PS1_BG_COLOR}")" # Context Env - if [[ -n "${KUBE_ENV_CTX_ENABLE}" ]] && [[ "${KUBE_ENV_CTX_ENABLE}" == true ]]; then + if [[ -n "${KUBE_PS1_ENV_CTX_ENABLE}" ]] && [[ "${KUBE_PS1_ENV_CTX_ENABLE}" == true ]]; then _kube_ps1_set_env_ctx fi From c32dc46b03013a44af78484500583c0a1cd81bbf Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Fri, 13 Mar 2026 23:58:52 +0200 Subject: [PATCH 10/14] docs: rename KUBE variables to KUBE_PS1 to inherit plugin convention --- plugins/kube-ps1/README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index e00e8b972..a57cdf585 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -127,7 +127,7 @@ The default prompt layout is: ```sh (|:) ``` -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 [] (|:) ``` @@ -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: From a80dc8a510aedb2514105dc5c05c998b3d876d34 Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Sat, 14 Mar 2026 10:30:19 +0200 Subject: [PATCH 11/14] docs: improve wording --- plugins/kube-ps1/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index a57cdf585..f1127f6db 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -208,7 +208,7 @@ the following variables: | `KUBE_PS1_CTX_COLOR_FUNCTION` | No default, must be user supplied | Function to customize context color based on context name | | `KUBE_PS1_HIDE_IF_NOCONTEXT` | `false` | Hide the kube-ps1 prompt if no context is set | -In case you would like to have more control over kube environment context, you can tackle: +For more control over the Kubernetes environment context, you can adjust: | Variable | Default | Meaning | | :------- | :-----: | ------- | @@ -248,7 +248,7 @@ 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_PS1_ENV_CTX_ENABLE` is set to `true`, you can also adjust: +If `KUBE_PS1_ENV_CTX_ENABLE` is set to `true`, you can also modify: | Variable | Default | Meaning | | :------- | :-----: | ------- | From ec3e68494165275399da1f58ce962453c5a65594 Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Sat, 14 Mar 2026 14:08:04 +0200 Subject: [PATCH 12/14] fix: extend dev regex --- plugins/kube-ps1/README.md | 2 +- plugins/kube-ps1/kube-ps1.plugin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index f1127f6db..a3771b61f 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -223,7 +223,7 @@ For more control over the Kubernetes environment context, you can adjust: | `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| +| `KUBE_PS1_ENV_DEV_RE` | `dev(elop(ment)?)?-` | Regex used to detect development in the context name | To disable a feature, set it to an empty string: diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index 00824ad93..1585224c9 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -56,7 +56,7 @@ KUBE_PS1_ENV_DEV_LABEL="${KUBE_PS1_ENV_DEV_LABEL:-dev}" KUBE_PS1_ENV_PROD_RE="${KUBE_PS1_ENV_PROD_RE:-(production|prod)-}" KUBE_PS1_ENV_STG_RE="${KUBE_PS1_ENV_STG_RE:-(staging|stg)-}" KUBE_PS1_ENV_TEST_RE="${KUBE_PS1_ENV_TEST_RE:-(testing|test)-}" -KUBE_PS1_ENV_DEV_RE="${KUBE_PS1_ENV_DEV_RE:-develop-}" +KUBE_PS1_ENV_DEV_RE="${KUBE_PS1_ENV_DEV_RE:-dev(elop(ment)?)?-}" _KUBE_PS1_KUBECONFIG_CACHE="${KUBECONFIG}" _KUBE_PS1_DISABLE_PATH="${HOME}/.kube/kube-ps1/disabled" From 9682a8a680aceb958aa4646b7da8b4dca38d2b3e Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Sat, 14 Mar 2026 16:15:18 +0200 Subject: [PATCH 13/14] fix: a bug with custom padding --- plugins/kube-ps1/kube-ps1.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index 1585224c9..5c979062a 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -40,8 +40,8 @@ KUBE_PS1_HIDE_IF_NOCONTEXT="${KUBE_PS1_HIDE_IF_NOCONTEXT:-false}" KUBE_PS1_ENV_CTX_ENABLE="${KUBE_PS1_ENV_CTX_ENABLE:-false}" KUBE_PS1_ENV_PADDING="${KUBE_PS1_ENV_PADDING:- }" -KUBE_PS1_ENV_OPEN_SYMBOL="${KUBE_PS1_ENV_OPEN_SYMBOL:-${KUBE_PS1_ENV_PADDING}[}" -KUBE_PS1_ENV_CLOSE_SYMBOL="${KUBE_PS1_ENV_CLOSE_SYMBOL:-]${KUBE_PS1_ENV_PADDING}}" +KUBE_PS1_ENV_OPEN_SYMBOL="${KUBE_PS1_ENV_OPEN_SYMBOL:-[}" +KUBE_PS1_ENV_CLOSE_SYMBOL="${KUBE_PS1_ENV_CLOSE_SYMBOL:-]}" KUBE_PS1_ENV_PROD_COLOR="${KUBE_PS1_ENV_PROD_COLOR:-red}" KUBE_PS1_ENV_STG_COLOR="${KUBE_PS1_ENV_STG_COLOR:-yellow}" @@ -177,7 +177,7 @@ _kube_ps1_symbol() { local symbol="" local symbol_default=$'\u2388' - local symbol_img="☸️" + local symbol_img="☸️" local k8s_glyph=$'\Uf10fe' local k8s_symbol_color=blue local oc_glyph=$'\ue7b7' @@ -364,7 +364,7 @@ _kube_ps1_set_env_ctx() { env_label="${KUBE_PS1_ENV_DEV_LABEL}" fi - KUBE_PS1+="${KUBE_PS1_ENV_OPEN_SYMBOL}${ctx_color}${env_label}${KUBE_PS1_RESET_COLOR}${KUBE_PS1_ENV_CLOSE_SYMBOL}" + KUBE_PS1+="${KUBE_PS1_ENV_PADDING}${KUBE_PS1_ENV_OPEN_SYMBOL}${ctx_color}${env_label}${KUBE_PS1_RESET_COLOR}${KUBE_PS1_ENV_CLOSE_SYMBOL}${KUBE_PS1_ENV_PADDING}" } # Set kube-ps1 shell defaults From 8a6e4ee0bf96ff65152d96c7aefe8e1c9aba80cf Mon Sep 17 00:00:00 2001 From: Oleksandr Molchanov Date: Sat, 14 Mar 2026 16:19:00 +0200 Subject: [PATCH 14/14] docs: remove extra spaces --- plugins/kube-ps1/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md index a3771b61f..de75c244b 100644 --- a/plugins/kube-ps1/README.md +++ b/plugins/kube-ps1/README.md @@ -253,8 +253,8 @@ If `KUBE_PS1_ENV_CTX_ENABLE` is set to `true`, you can also modify: | Variable | Default | Meaning | | :------- | :-----: | ------- | | `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_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