Skip to content

Instantly share code, notes, and snippets.

@dkln
Created August 16, 2010 13:26
Show Gist options
  • Save dkln/526932 to your computer and use it in GitHub Desktop.
Save dkln/526932 to your computer and use it in GitHub Desktop.
function rvm_version {
local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
[ "$gemset" != "" ] && gemset="@$gemset"
local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}')
[ "$version" != "" ] && version="@$version"
local full="$version$gemset"
[ "$full" != "" ] && echo "$full "
}
export PS1="\$(rvm_version)$PS1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment