aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArav Singhal <singhal.arav@gmail.com>2016-09-30 19:02:22 +0300
committerArav Singhal <singhal.arav@gmail.com>2016-09-30 19:02:22 +0300
commit9b7fffe1a8d213c8de734836c5bcd5d5c5ad0a4c (patch)
tree7833348a6323813dd553043d5b3a1bfabf7422a8
parentc4fdc8f70804fea6f543e6bbf3964301e2537e36 (diff)
Make status prompt show OK in non-verbose mode
* The status prompt now shows the OK icon even in non-verbose mode. A toggle may be added to this effect in the future.
-rwxr-xr-xpowerlevel9k.zsh-theme11
1 files changed, 4 insertions, 7 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 0860cff4..08100a41 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -740,16 +740,14 @@ prompt_rvm() {
# Status: return code if verbose, otherwise just an icon if an error occurred
set_default POWERLEVEL9K_STATUS_VERBOSE true
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
+ else
+ "$1_prompt_segment" "$0_OK" "$2" "$DEFAULT_COLOR" "046" "" 'OK_ICON'
fi
}
@@ -1082,4 +1080,3 @@ powerlevel9k_init() {
}
powerlevel9k_init "$@"
-