Shell: Prompt mit git branch

Eintrag in ~/.bashrc und /root/.bashrc:

export PS1="\[\033[0;31m\]\u\[\033[m\]@\[\033[32m\]\[\033[33;1m\]\w\[\033[0;32m\](\$(git branch 2>/dev/null | grep '^*' | colrm 1 2))\[\033[m\]\$ "