Added colour to the Git branch prompt indicator.

This commit is contained in:
Scott Wallace 2015-02-20 14:27:47 +00:00
parent cbacbe862f
commit 79bcd7bc52

View file

@ -22,7 +22,7 @@ export PATH=/usr/local/bin:/usr/local/sbin:${PATH}
parse_git_branch() { parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ <\1>/' git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ <\1>/'
} }
export PS1="[\u@\h \W \$(parse_git_branch)]\\$ " export PS1="[\u@\h \W \[\033[32m\]\$(parse_git_branch)\[\033[00m\]]\\$ "
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
#-------------------------------------------------------------------------------- #--------------------------------------------------------------------------------