Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Add these functions to your .profile to know the git branch, ruby version
- # and the rvm gemset that you are currently using
- function bash_git_branch
- {
- git branch 2> /dev/null | grep \* | python -c "print '['+raw_input()[2:]+']'" 2> /dev/null
- }
- function ruby_version
- {
- ruby -v 2> /dev/null | awk '{ print $2}'
- }
- function rvm_gemset
- {
- rvm gemset name 2> /dev/null|awk '{if ($0=="") print ""; else print "@" $0 }' 2> /dev/null
- }
- # you can turbocharge your command prompt to display them.
- export PS1="\u@\h \w\$(bash_git_branch) r(\$(ruby_version)\$(rvm_gemset)) \$ "
Add Comment
Please, Sign In to add comment