summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorChristian Höltje <docwhat@gerf.org>2017-07-27 06:39:49 +0300
committerChristian Höltje <docwhat@gerf.org>2017-07-27 06:39:49 +0300
commitbe6c0320252d2c750884a90664a26b58eb824920 (patch)
tree8e01eec96cddedd24a71b5222b0f7390fb31371d /powerlevel9k.zsh-theme
parent0bcef50e29f55c2858457c8a06da3219b1911a85 (diff)
rvm: handle -head, etc. more gracefully.
Closes #575
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme9
1 files changed, 3 insertions, 6 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 16904af7..d6ce38f1 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1070,13 +1070,10 @@ prompt_rspec_stats() {
# Ruby Version Manager information
prompt_rvm() {
- local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
- [ "$gemset" != "" ] && gemset="@$gemset"
+ local version_and_gemset=${rvm_env_string/ruby-}
- local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $NF}')
-
- if [[ -n "$version$gemset" ]]; then
- "$1_prompt_segment" "$0" "$2" "240" "$DEFAULT_COLOR" "$version$gemset" 'RUBY_ICON'
+ if [[ -n "$version_and_gemset" ]]; then
+ "$1_prompt_segment" "$0" "$2" "240" "$DEFAULT_COLOR" "$version_and_gemset" 'RUBY_ICON'
fi
}