git/93git-branch.sh
2021-04-22 08:56:33 +00:00

5 lines
199 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