Remove the abstraction of a function for determining the current Git branch in the prompt.
This commit is contained in:
parent
813b8d65f6
commit
a029458150
5
.bashrc
5
.bashrc
|
@ -26,10 +26,7 @@ fi
|
|||
#--------------------------------------------------------------------------------
|
||||
# A useful prompt
|
||||
#--------------------------------------------------------------------------------
|
||||
parse_git_branch() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ <\1>/'
|
||||
}
|
||||
export PS1="[\u@\h \W \[\033[32m\]\$(parse_git_branch)\[\033[00m\]]\\$ "
|
||||
export PS1="[\u@\h \W \[\033[32m\]\$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ <\1>/')\[\033[00m\]]\\$ "
|
||||
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue