summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorArav Singhal <singhal.arav@gmail.com>2016-10-27 09:12:21 +0300
committerArav Singhal <singhal.arav@gmail.com>2016-10-27 09:12:21 +0300
commitcde591ce2e8034a181a2321365ee662f54dc2d63 (patch)
tree41ea04fb1200a099a325a3919e58c146edda8e7a /powerlevel9k.zsh-theme
parent9b7fffe1a8d213c8de734836c5bcd5d5c5ad0a4c (diff)
Add toggle for showing OK in non verbose status
Adds the toggle POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE for more customizability. If POWERLEVEL9K_STATUS_VERBOSE is false and POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE is true, the status prompt will show the OK visual identifier like in verbose mode. The prompt will show the OK identifier even if POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE is false in verbose mode.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme3
1 files changed, 2 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 08100a41..eae2cd73 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -739,6 +739,7 @@ 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 [[ "$RETVAL" -ne 0 ]]; then
if [[ "$POWERLEVEL9K_STATUS_VERBOSE" == true ]]; then
@@ -746,7 +747,7 @@ prompt_status() {
else
"$1_prompt_segment" "$0_ERROR" "$2" "$DEFAULT_COLOR" "red" "" 'FAIL_ICON'
fi
- else
+ 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
}