blob: 146cc356c9bf4cf0407475ed47925c37d5ed498b [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}
JFSIII1b7c9412011-06-17 19:45:21 -040016
17function prompt_command() {
18 # Check http://github.com/Sirupsen/dotfiles for screenshot
19 PS1="$blue\W/$bold_blue$(rvm_version_prompt)$bold_green$(__git_ps1 " (%s)") ${normal}$ "
20}
Sirupsenb4257a42010-10-10 20:05:03 +020021
JFSIII1b7c9412011-06-17 19:45:21 -040022PROMPT_COMMAND=prompt_command;