Encontrado aqui: https://techcommons.stanford.edu/topics/git/show-git-branch-bash-prompt
function gb {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/(1)/'
}
function proml {
local BLUE="[ 33[0;34m]"
local RED="[ 33[0;31m]"
local LIGHT_RED="[ 33[1;31m]"
local GREEN="[ 33[0;32m]"
local LIGHT_GREEN="[ 33[1;32m]"
local WHITE="[ 33[1;37m]"
local LIGHT_GRAY="[ 33[0;37m]"
PS1="$LIGHT_GRAYu@h:$LIGHT_REDw $LIGHT_GREEN$(gb)
$LIGHT_GRAY# "
PS2='> '
PS4='+ '
}
proml