We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d4d0a6 commit 71de48aCopy full SHA for 71de48a
1 file changed
kube-ps1.sh
@@ -356,7 +356,7 @@ _kube_ps1_set_env_ctx() {
356
357
for ctx in prod test dev stg; do
358
if grep -qE "${KUBE_PS1_ENV[${ctx}_re]}" <<< "${KUBE_PS1_CONTEXT}"; then
359
- sed -E "s/${KUBE_PS1_ENV[${ctx}_re]}//g" <<< "${KUBE_PS1_CONTEXT}" > /dev/null
+ KUBE_PS1_CONTEXT="$(sed -E "s/${KUBE_PS1_ENV[${ctx}_re]}//g" <<< "${KUBE_PS1_CONTEXT}")"
360
ctx_color="$(_kube_ps1_color_fg "${KUBE_PS1_ENV[${ctx}_color]}")"
361
ctx_label="${KUBE_PS1_ENV[${ctx}_label]}"
362
fi
0 commit comments