When kube-ps1 is invoked with a custom $KUBE_PS1_BG_COLOR, the resulting prompt is output without the correct escape bytes around the background color sequence. This causes shell history recall to wrap incorrectly and corrupt the line, as described in this BashFAQ.
This was caused by a reference to a nonexistent pair of variables, $OPEN_ESC and $CLOSE_ESC, in the _kube_ps1_color_bg function. This PR replaces these with $_KUBE_PS1_OPEN_ESC and _KUBE_PS1_CLOSE_ESC, which appears to be the original intention.
When kube-ps1 is invoked with a custom
$KUBE_PS1_BG_COLOR
, the resulting prompt is output without the correct escape bytes around the background color sequence. This causes shell history recall to wrap incorrectly and corrupt the line, as described in this BashFAQ.This was caused by a reference to a nonexistent pair of variables,
$OPEN_ESC
and$CLOSE_ESC
, in the_kube_ps1_color_bg
function. This PR replaces these with$_KUBE_PS1_OPEN_ESC
and_KUBE_PS1_CLOSE_ESC
, which appears to be the original intention.