summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorPavel Peganov <D-side@users.noreply.github.com>2017-06-11 04:09:00 +0300
committerGitHub <noreply@github.com>2017-06-11 04:09:00 +0300
commit65c770606b621a9d1cf809345f7baac6c800ff2a (patch)
treeec7572b09e9b276e20026f179bb4643ce16e7d2d /powerlevel9k.zsh-theme
parent4be16020b7cd7241b75c23db9f5bd3d4fce84686 (diff)
Fixed RVM segment for usernames with dashes
Having a username with a dash, such as mine, `d-side`, currently results in RVM segment displaying the wrong thing, e. g. `side/.rvm/rubies/ruby`. This fixes the issue.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 26ab9cd5..657d691d 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -990,7 +990,7 @@ prompt_rvm() {
local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
[ "$gemset" != "" ] && gemset="@$gemset"
- local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}')
+ 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'