未验证 提交 4d0efc87 编写于 作者: J Jan Bernlöhr 提交者: GitHub

themes/powerline: Fix POWERLINE_PROMPT is not an array (#37)

Authored-by: NJan Bernloehr <bosch.bernloehr@extaccount.com>
上级 749823b7
......@@ -148,8 +148,13 @@ function __powerline_prompt_command {
SEGMENTS_AT_LEFT=0
LAST_SEGMENT_COLOR=""
# The IFS (internal field seperator) may have been changed outside to not contain
# the space character ' ' whence we need to make sure that the space separated list
# stored in POWERLINE_PROMPT is converted into an array correctly.
IFS=' ' read -r -a POWERLINE_PROMPT_ARRAY <<< "${POWERLINE_PROMPT}"
## left prompt ##
for segment in $POWERLINE_PROMPT; do
for segment in ${POWERLINE_PROMPT_ARRAY[@]}; do
local info="$(__powerline_${segment}_prompt)"
[[ -n "${info}" ]] && __powerline_left_segment "${info}"
done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册