Fixes prompt color
parent
546b4e948f
commit
8d5233ac19
|
|
@ -233,8 +233,15 @@ function __powerline_prompt_command {
|
|||
done
|
||||
|
||||
[[ "${last_status}" -ne 0 ]] && __powerline_left_segment $(__powerline_last_status_prompt ${last_status})
|
||||
[[ -n "${LEFT_PROMPT}" ]] && [[ -n "${POWERLINE_LEFT_LAST_SEGMENT_PROMPT_CHAR}" ]] && LEFT_PROMPT+="$(set_color - ${LAST_SEGMENT_COLOR})${POWERLINE_LEFT_LAST_SEGMENT_PROMPT_CHAR}${normal}"
|
||||
[[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${normal}"
|
||||
|
||||
# By default we try to match the prompt to the adjacent segment's background color,
|
||||
# but when part of the prompt exists within that segment, we instead match the foreground color.
|
||||
local prompt_color="$(set_color ${LAST_SEGMENT_COLOR} -)"
|
||||
if [[ -n "${LEFT_PROMPT}" ]] && [[ -n "${POWERLINE_LEFT_LAST_SEGMENT_PROMPT_CHAR}" ]]; then
|
||||
LEFT_PROMPT+="$(set_color - ${LAST_SEGMENT_COLOR})${POWERLINE_LEFT_LAST_SEGMENT_PROMPT_CHAR}"
|
||||
prompt_color="${normal}"
|
||||
fi
|
||||
[[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="${prompt_color}${separator_char}${normal}"
|
||||
|
||||
PS1="${LEFT_PROMPT} "
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue