Merge pull request #244 from oddjobsman/master

Modified theme to use PROMPT_COMMAND instead of PS1
pull/248/merge
Travis Swicegood 2013-12-17 14:53:14 -08:00
commit f26584f649
1 changed files with 5 additions and 1 deletions

View File

@ -40,4 +40,8 @@ parse_git_branch () {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
}
function prompt_command() {
PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
}
PROMPT_COMMAND=prompt_command