1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 13:30:07 +00:00

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.
This commit is contained in:
Pavel Peganov 2017-06-11 04:09:00 +03:00 committed by GitHub
parent 4be16020b7
commit 65c770606b

View file

@ -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'