aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2019-02-09 19:46:40 +0300
committerGitHub <noreply@github.com>2019-02-09 19:46:40 +0300
commitdcd7718c62a935b545bd60148e9ea4d7bdf9e70a (patch)
tree97f6b59f5e94c05d9d5a44b33fc1712be0e7a5ac /powerlevel9k.zsh-theme
parentf7d0293d8b9596705abb945e90bc6a1d7211b18d (diff)
parent58f70e57e65097e73604e35b8e8334a8e34afbee (diff)
Merge pull request #1149 from dritter/HaoZeke-fix-RVM
Fix RVM
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 5 insertions, 3 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 24967429..a4f752c5 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1365,10 +1365,12 @@ prompt_rspec_stats() {
################################################################
# Segment to display Ruby Version Manager information
prompt_rvm() {
- local version_and_gemset=${rvm_env_string/ruby-}
+ if [ $commands[rvm-prompt] ]; then
+ local version_and_gemset=${$(rvm-prompt v p)/ruby-}
- if [[ -n "$version_and_gemset" ]]; then
- "$1_prompt_segment" "$0" "$2" "grey35" "$DEFAULT_COLOR" "$version_and_gemset" 'RUBY_ICON'
+ if [[ -n "$version_and_gemset" ]]; then
+ "$1_prompt_segment" "$0" "$2" "240" "$DEFAULT_COLOR" "$version_and_gemset" 'RUBY_ICON'
+ fi
fi
}