aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme9
1 files changed, 7 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 14d7bd81..2255a04a 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1163,8 +1163,13 @@ prompt_status() {
local ec
if [[ $POWERLEVEL9K_STATUS_SHOW_PIPESTATUS == true ]]; then
- ec_text=$(exit_code_or_status "${RETVALS[1]}")
- ec_sum=${RETVALS[1]}
+ if (( $#RETVALS > 1 )); then
+ 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
ec_text="${ec_text}|$(exit_code_or_status "$ec")"