bugfix: powerline - IFS doesnt split \x20 in prompt on some machines
parent
3d4c46bd12
commit
6e1f389952
|
|
@ -154,12 +154,16 @@ function __powerline_prompt_command {
|
||||||
LEFT_PROMPT+="$(set_color ${PROMPT_DISTRO_LOGO_COLOR} ${PROMPT_DISTRO_LOGO_COLORBG})${PROMPT_DISTRO_LOGO}$(set_color - -)"
|
LEFT_PROMPT+="$(set_color ${PROMPT_DISTRO_LOGO_COLOR} ${PROMPT_DISTRO_LOGO_COLORBG})${PROMPT_DISTRO_LOGO}$(set_color - -)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local OLD_IFS="${IFS}"; IFS=" "
|
||||||
|
|
||||||
## left prompt ##
|
## left prompt ##
|
||||||
for segment in $POWERLINE_PROMPT; do
|
for segment in $POWERLINE_PROMPT; do
|
||||||
local info="$(__powerline_${segment}_prompt)"
|
local info="$(__powerline_${segment}_prompt)"
|
||||||
[[ -n "${info}" ]] && __powerline_left_segment "${info}"
|
[[ -n "${info}" ]] && __powerline_left_segment "${info}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
IFS="${OLD_IFS}"
|
||||||
|
|
||||||
[[ "${last_status}" -ne 0 ]] && __powerline_left_segment $(__powerline_last_status_prompt ${last_status})
|
[[ "${last_status}" -ne 0 ]] && __powerline_left_segment $(__powerline_last_status_prompt ${last_status})
|
||||||
[[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${normal}"
|
[[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${normal}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue