ask rbenv for current version instead of reading rbenv/version file
This commit is contained in:
parent
fae42395f5
commit
8812584047
@ -15,11 +15,14 @@
|
||||
function rvm_info_for_prompt {
|
||||
if [[ -d ~/.rvm/ ]]; then
|
||||
ruby_version=$(~/.rvm/bin/rvm-prompt)
|
||||
if [ -n "$ruby_version" ]; then
|
||||
echo "[$ruby_version]"
|
||||
fi
|
||||
elif [[ -d ~/.rbenv/ ]]; then
|
||||
ruby_version=$(<~/.rbenv/version)
|
||||
fi
|
||||
if [ -n "$ruby_version" ]; then
|
||||
echo "[$ruby_version]"
|
||||
ruby_version=(${(s: :)$(rbenv version)})
|
||||
if [ -n "$ruby_version" ]; then
|
||||
echo "[${ruby_version[1]}]"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user