theme/powerline-base: allow `$POWERLINE_PROMPT` as array

pull/2054/head
John D Pell 2022-02-12 21:22:47 -08:00
parent 1afbe31158
commit c697ada0a5
1 changed files with 2 additions and 1 deletions

View File

@ -286,7 +286,8 @@ function __powerline_prompt_command() {
fi fi
## left prompt ## ## left prompt ##
for segment in ${POWERLINE_PROMPT-"user_info" "scm" "python_venv" "ruby" "node" "cwd"}; do # shellcheck disable=SC2068 # intended behavior
for segment in ${POWERLINE_PROMPT[@]-"user_info" "scm" "python_venv" "ruby" "node" "cwd"}; do
info="$("__powerline_${segment}_prompt")" info="$("__powerline_${segment}_prompt")"
[[ -n "${info}" ]] && __powerline_left_segment "${info}" [[ -n "${info}" ]] && __powerline_left_segment "${info}"
done done