vi ~/.bash_profile
### 显示git分支
parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/[1]/'
}
BLACK="[ 33[0;38m]"
RED="[ 33[0;31m]"
RED_BOLD="[ 33[01;31m]"
BLUE="[ 33[01;34m]"
GREEN="[ 33[0;32m]"
export PS1="$BLACK[ u@$REDh $GREENw$RED_BOLD$(parse_git_branch)$BLACK ] "
####