git/93git-branch.sh
2023-07-27 10:17:26 +03:00

6 lines
237 B
Bash

# Include the current git branch in the prompt
. /etc/bash-completion.d/git-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