I wanted to use one of the Git-completion.bash features but I can't customize the look I'd like to have. Here is relevant part of my .bash_profile:
source ~/.git-completion.bash
function prompt
{
local WHITE="\[\033[1;37m\]"
local GREEN="\[\033[0;32m\]"
local CYAN="\[\033[0;36m\]"
local GRAY="\[\033[0;37m\]"
local BLUE="\[\033[0;34m\]"
export PS1="
${GREEN}\u${CYAN}@${BLUE}\h ${CYAN}\w $(__git_ps1 '(%s)') ${GRAY}
$ "
}
prompt
and it doesn't show the branch name.
However, if I replace export PS1 above with the one below, it works as expected:
export PS1='\w$(__git_ps1 "(%s)") > '
I guess it's some apostrophe / quotation marks issue.
How should I correct the 1st version to get it to work?