diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2018-04-14 04:50:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-14 04:50:49 +0300 |
commit | 83e32671020e5db5d93d925271175b636f88fbab (patch) | |
tree | 14842afca52a560b6dd86154645c8f6c7c408346 | |
parent | 3dc17fce9650a36c961a6eb6f64ac78f81703152 (diff) | |
parent | fe33c401bac783181e0fc53401685fa9b2ad0e24 (diff) |
Merge pull request #789 from docwhat/pr/status-bug
workaround for ZSH status behavior
-rwxr-xr-x | powerlevel9k.zsh-theme | 9 |
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")" |