I am trying to create a custom segment using p10k segment, and I've noticed that setting the background color with -b is never used. Trying to set it to red does not work:
function prompt_drd_dev_env() {
if [[ ! -z $DRD_DEV_ENV ]]; then
p10k segment -b red -f white -t "$DRD_DEV_ENV"
fi
}
But using the configuration variable POWERLEVEL9K_DRD_DEV_ENV_BACKGROUND does work:
typeset -g POWERLEVEL9K_DRD_DEV_ENV_BACKGROUND='red'
function prompt_drd_dev_env() {
if [[ ! -z $DRD_DEV_ENV ]]; then
p10k segment -f white -t "$DRD_DEV_ENV"
fi
}
Using -b and the variable still does not work, as this still has a red background, as above:
typeset -g POWERLEVEL9K_DRD_DEV_ENV_BACKGROUND='red'
function prompt_drd_dev_env() {
if [[ ! -z $DRD_DEV_ENV ]]; then
p10k segment -b blue -f white -t "$DRD_DEV_ENV"
fi
}
I found Issue #2632, which sounds like this is intended behavior. But I'm not seeing how the -b color is ever used. What is the point of -b if it is always overridden?
Hello,
I am trying to create a custom segment using
p10k segment
, and I've noticed that setting the background color with-b
is never used. Trying to set it tored
does not work:But using the configuration variable
POWERLEVEL9K_DRD_DEV_ENV_BACKGROUND
does work:Using
-b
and the variable still does not work, as this still has a red background, as above:I found Issue #2632, which sounds like this is intended behavior. But I'm not seeing how the
-b
color is ever used. What is the point of-b
if it is always overridden?I am using the P10k from git at commit 16e5848.