Sirupsen | b4257a4 | 2010-10-10 20:05:03 +0200 | [diff] [blame] | 1 | # For unstaged(*) and staged(+) values next to branch name in __git_ps1 |
| 2 | GIT_PS1_SHOWDIRTYSTATE="enabled" |
| 3 | |
| 4 | function rvm_version_prompt { |
| 5 | local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}') |
| 6 | |
| 7 | [ "$gemset" != "" ] && gemset="@$gemset" |
| 8 | local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}') |
| 9 | |
| 10 | [ "$version" == "1.9.2" ] && version="" |
| 11 | |
| 12 | local full="$version$gemset" |
| 13 | |
| 14 | [ "$full" != "" ] && echo "$full" |
| 15 | } |
| 16 | |
| 17 | # Check http://github.com/Sirupsen/dotfiles for screenshot |
| 18 | PS1='\[$blue\]\W/\[$bold_blue\]$(rvm_version_prompt)\[$bold_green\]$(__git_ps1 " (%s)") \[${normal}\]$ ' |