mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Added a rvm_with_gemset function to lib/rvm.zsh to print out the ruby along with the gemset ex.: ruby-1.9.2@rails3
This commit is contained in:
parent
cd906cad9c
commit
bef797c23c
1 changed files with 11 additions and 0 deletions
11
lib/rvm.zsh
11
lib/rvm.zsh
|
|
@ -4,4 +4,15 @@ function rvm_prompt_info() {
|
|||
echo "($ruby_version)"
|
||||
}
|
||||
|
||||
# get the name of the ruby as well as the gemset
|
||||
# from http://snipplr.com/view.php?codeview&id=36724
|
||||
function rvm_with_gemset {
|
||||
local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
|
||||
[ "$gemset" != "" ] && gemset="@$gemset"
|
||||
# local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}')
|
||||
local version=$(~/.rvm/bin/rvm-prompt s i v)
|
||||
[ "$version" != "" ] && version="$version"
|
||||
local full="$version$gemset"
|
||||
[ "$full" != "" ] && echo "$full"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue