bash:
export PS1='\[\033[38m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]$(__git_ps1 "(%s) ")\[\033[37m\]$\[\033[0m\] '
zsh:
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' formats '(%b) '
precmd() {
vcs_info
}
setopt PROMPT_SUBST
PROMPT=$'%F{white}%n@mbp %B%F{blue}%~ %b%B%F{red}${vcs_info_msg_0_}%b%f%F{white}$%f '