--- a/.bash_prompt Sun Feb 15 23:38:25 2015 +0800
+++ b/.bash_prompt Tue Feb 17 15:05:53 2015 +0800
if [[ $STATUS == *'Your branch is behind'* ]] ; then
- [[ $STATUS =~ behind[^$'\n']+([0-9]+)' 'commit ]] && BEHIND+=${BASH_REMATCH[1]}
+ [[ $STATUS =~ 'behind '[^$'\n']+' '([0-9]+)' commit' ]] && BEHIND+=${BASH_REMATCH[1]}
if [[ $STATUS == *'Your branch is ahead'* ]] ; then
- [[ $STATUS =~ ahead[^$'\n']+([0-9]+)' 'commit ]] && AHEAD+=${BASH_REMATCH[1]}
+ [[ $STATUS =~ 'ahead '[^$'\n']+' '([0-9]+)' commit' ]] && AHEAD+=${BASH_REMATCH[1]}
if [[ $STATUS == *detached* ]] ; then