diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2016-10-27 17:57:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-27 17:57:12 +0300 |
commit | b54abe48dc080a595224f91f123245ca3e28ba9f (patch) | |
tree | 2ea997ecabdf9fbf002abd3e229361744551e8d6 /powerlevel9k.zsh-theme | |
parent | 11fcb5684b3b777ebfeb01edc4b985951c8f04a6 (diff) | |
parent | b129cd09e00202a7f3c1d43e3e60a9e2da1e076c (diff) |
Merge pull request #332 from eviltak/show-ok-in-non-verbose-status
Show OK in non verbose status prompt
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 87678149..7e68af2b 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -748,17 +748,16 @@ prompt_rvm() { # Status: return code if verbose, otherwise just an icon if an error occurred set_default POWERLEVEL9K_STATUS_VERBOSE true +set_default POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE false prompt_status() { - if [[ "$POWERLEVEL9K_STATUS_VERBOSE" == true ]]; then - if [[ "$RETVAL" -ne 0 ]]; then + if [[ "$RETVAL" -ne 0 ]]; then + if [[ "$POWERLEVEL9K_STATUS_VERBOSE" == true ]]; then "$1_prompt_segment" "$0_ERROR" "$2" "red" "226" "$RETVAL" 'CARRIAGE_RETURN_ICON' else - "$1_prompt_segment" "$0_OK" "$2" "$DEFAULT_COLOR" "046" "" 'OK_ICON' - fi - else - if [[ "$RETVAL" -ne 0 ]]; then "$1_prompt_segment" "$0_ERROR" "$2" "$DEFAULT_COLOR" "red" "" 'FAIL_ICON' fi + elif [[ "$POWERLEVEL9K_STATUS_VERBOSE" == true || "$POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE" == true ]]; then + "$1_prompt_segment" "$0_OK" "$2" "$DEFAULT_COLOR" "046" "" 'OK_ICON' fi } @@ -1091,4 +1090,3 @@ powerlevel9k_init() { } powerlevel9k_init "$@" - |