Added colour to the Git branch prompt indicator.
This commit is contained in:
parent
cbacbe862f
commit
79bcd7bc52
2
.bashrc
2
.bashrc
|
@ -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"'
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue