diff options
Diffstat (limited to 'git-prompt.sh')
-rw-r--r-- | git-prompt.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git-prompt.sh b/git-prompt.sh new file mode 100644 index 0000000..c3741b1 --- /dev/null +++ b/git-prompt.sh @@ -0,0 +1,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 |