git/93git-branch.sh
2012-02-01 17:20:12 +04:00

5 lines
201 B
Bash

# Include the current git branch in the prompt
if type __git_ps1 &>/dev/null; then
export PS1="$(echo -n "$PS1" | sed "s|\\\W\]|\\\W\$(type __git_ps1 \&>/dev/null \&\& __git_ps1 \" (%s)\")\]|")"
fi