Show the Current RVM Info in Your Command Prompt
I’ve recently started using RVM to manage the Ruby versions and Gem sets of the different projects I’m working on.
So, much like showing the current Git branch, I thought it would be really useful to show the current RVM environment (ruby version and gemset name) as part of the command prompt.
So I just added rvm-prompt to the previous snippet.
To use this, just add the following to your ~/.profile file:
PS1=”$GREEN\\u@machine$NO_COLOUR:\\w:$LIGHT\_GRAY\\$(~/.rvm/bin/rvm-prompt i v g)$NO_COLOUR:$YELLOW\\$(parse\_git\_branch)$NO_COLOUR\\\$ ”