git/93git-branch.sh

7 lines
253 B
Bash
Raw Normal View History

2012-02-01 14:53:17 +04:00
# Include the current git branch in the prompt
2023-10-10 10:40:02 +09:00
. /usr/share/bash-completion/completions/git-prompt
2012-02-01 14:53:17 +04:00
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