From cde591ce2e8034a181a2321365ee662f54dc2d63 Mon Sep 17 00:00:00 2001 From: Arav Singhal Date: Thu, 27 Oct 2016 11:42:21 +0530 Subject: [PATCH] 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. --- powerlevel9k.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }