1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-14 17:10:07 +00:00

Merge pull request #789 from docwhat/pr/status-bug

workaround for ZSH status behavior
This commit is contained in:
Ben Hilburn 2018-04-13 21:50:49 -04:00 committed by GitHub
commit 83e3267102
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1163,8 +1163,13 @@ prompt_status() {
local ec local ec
if [[ $POWERLEVEL9K_STATUS_SHOW_PIPESTATUS == true ]]; then if [[ $POWERLEVEL9K_STATUS_SHOW_PIPESTATUS == true ]]; then
ec_text=$(exit_code_or_status "${RETVALS[1]}") if (( $#RETVALS > 1 )); then
ec_sum=${RETVALS[1]} ec_text=$(exit_code_or_status "${RETVALS[1]}")
ec_sum=${RETVALS[1]}
else
ec_text=$(exit_code_or_status "${RETVAL}")
ec_sum=${RETVAL}
fi
for ec in "${(@)RETVALS[2,-1]}"; do for ec in "${(@)RETVALS[2,-1]}"; do
ec_text="${ec_text}|$(exit_code_or_status "$ec")" ec_text="${ec_text}|$(exit_code_or_status "$ec")"