summaryrefslogtreecommitdiff
path: root/git-prompt.sh
blob: c3741b1331fee494d8daddfa76ffe2f2f92ec274 (plain)
1
2
3
4
5
6
# Include the current git branch in the prompt

if [ -f /usr/share/bash-completion/completions/git-prompt.sh ]; then
  . /usr/share/bash-completion/completions/git-prompt.sh
  PS1="$(echo -n "$PS1" | sed "s|\\\W\]|\\\W\$(type __git_ps1 >/dev/null  2>\&1 \&\& __git_ps1 \" (%s)\")\]|")"
fi