Skip to content

Instantly share code, notes, and snippets.

@chsh
Created October 23, 2010 12:09
Show Gist options
  • Select an option

  • Save chsh/642132 to your computer and use it in GitHub Desktop.

Select an option

Save chsh/642132 to your computer and use it in GitHub Desktop.
Show ruby version and gemset name on RPROMPT using rvm-prompt
_update_rprompt () {
if [ "`git ls-files 2>/dev/null`" ]; then
RPROMPT="[$(rvm-prompt v g):%2.:$GIT_CURRENT_BRANCH]"
else
# RPROMPT="[%~]"
RPROMPT="[$(rvm-prompt v g):%2.]"
fi
}
@chsh
Copy link
Author

chsh commented Oct 23, 2010

If you use rvm. This is easiest way to display ruby version and gemset name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment