diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-07-12 09:13:52 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-07-12 09:13:52 +0300 |
commit | 8cd39beaade30a67c0fc4494b241293b65982cc8 (patch) | |
tree | 0edac36909d4995d15dea11c2a4ae7b54c10718c /powerlevel9k.zsh-theme | |
parent | d031b3e03522d47607173ebda89e7558b622a322 (diff) |
FIx status segment
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index c1ea754f..ab56d234 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1779,10 +1779,16 @@ powerlevel9k_preexec() { set_default POWERLEVEL9K_PROMPT_ADD_NEWLINE false powerlevel9k_prepare_prompts() { - local RETVAL RPROMPT_PREFIX RPROMPT_SUFFIX + # Return values. These need to be global, because + # they are used in prompt_status. Also, we need + # to get the return value of the last command at + # very first in this function. Do not move the + # lines down, otherwise the last command is not + # what you expected it to be. RETVAL=$? RETVALS=( "$pipestatus[@]" ) + local RPROMPT_SUFFIX RPROMPT_PREFIX _P9K_COMMAND_DURATION=$((EPOCHREALTIME - _P9K_TIMER_START)) # Reset start time |