blob: 506658710a93065a765cb069a9897ad878b00cfc [file] [log] [blame]
Sirupsenb4257a42010-10-10 20:05:03 +02001# For unstaged(*) and staged(+) values next to branch name in __git_ps1
2GIT_PS1_SHOWDIRTYSTATE="enabled"
3
4function 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
18PS1='\[$blue\]\W/\[$bold_blue\]$(rvm_version_prompt)\[$bold_green\]$(__git_ps1 " (%s)") \[${normal}\]$ '