Remove the abstraction of a function for determining the current Git branch in the prompt.

This commit is contained in:
Scott Wallace 2015-09-14 13:26:36 -04:00
parent 813b8d65f6
commit a029458150

View file

@ -26,10 +26,7 @@ fi
#-------------------------------------------------------------------------------- #--------------------------------------------------------------------------------
# A useful prompt # A useful prompt
#-------------------------------------------------------------------------------- #--------------------------------------------------------------------------------
parse_git_branch() { export PS1="[\u@\h \W \[\033[32m\]\$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ <\1>/')\[\033[00m\]]\\$ "
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ <\1>/'
}
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"'
#-------------------------------------------------------------------------------- #--------------------------------------------------------------------------------