aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorMatt Nicholson <mnicholson@spotify.com>2017-08-17 17:45:45 +0300
committerMatt Nicholson <mnicholson@spotify.com>2017-09-06 17:25:18 +0300
commit79a73ef4aaa0f2c5a98ec837bf198dccf7d8c90f (patch)
treee670745a34476c84667d1bebf08ce4274df2b66e /powerlevel9k.zsh-theme
parent9f4faf7f21a992f32114f134dfb0737657241b37 (diff)
add ability to force rbenv being shown
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme12
1 files changed, 8 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 3c34f0bb..dc2af025 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1047,11 +1047,15 @@ prompt_rbenv() {
local rbenv_global="$(rbenv global)"
# Don't show anything if the current Ruby is the same as the global Ruby.
- if [[ $rbenv_version_name == $rbenv_global ]]; then
- return
+ # Unless POWERLEVEL_RBENV_ALWAYS is set.
+ set_default POWERLEVEL9K_RBENV_ALWAYS false
+ if [[ $POWERLEVEL9K_RBENV_ALWAYS == true || $rbenv_version_name != $rbenv_global ]];then
+ "$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "$rbenv_version_name" 'RUBY_ICON'
+ #elif [[ $rbenv_version_name != $rbenv_global ]]; then
+ # "$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "$rbenv_version_name" 'RUBY_ICON'
+ #else
+ # return
fi
-
- "$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "$rbenv_version_name" 'RUBY_ICON'
fi
}