Homebrew's Git Formula does not appear to include __git_ps1. It is trivial to emulate with a shell alias though, so I did.
Add these lines to ~/.bashrc:
alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/(\1)/'"
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;\w \$(__git_ps1)\a\]\$> "
;;
*)
;;
esac
No comments:
Post a Comment