summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2018-04-14 04:50:49 +0300
committerGitHub <noreply@github.com>2018-04-14 04:50:49 +0300
commit83e32671020e5db5d93d925271175b636f88fbab (patch)
tree14842afca52a560b6dd86154645c8f6c7c408346
parent3dc17fce9650a36c961a6eb6f64ac78f81703152 (diff)
parentfe33c401bac783181e0fc53401685fa9b2ad0e24 (diff)
Merge pull request #789 from docwhat/pr/status-bug
workaround for ZSH status behavior
-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")"