summaryrefslogtreecommitdiff
path: root/bash-git-prompt
diff options
context:
space:
mode:
Diffstat (limited to 'bash-git-prompt')
-rw-r--r--bash-git-prompt10
1 files changed, 10 insertions, 0 deletions
diff --git a/bash-git-prompt b/bash-git-prompt
index 05a7907..9bce386 100644
--- a/bash-git-prompt
+++ b/bash-git-prompt
@@ -1,2 +1,12 @@
#!/bin/bash
+PS='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}<\t> \[\033[01;32m\]\u\[\033[00m\]@\[\033[01;33m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]'
+
+set -o pipefail
+
+if branch=$(git branch 2>/dev/null | grep '\*' | cut -d' ' -f2)
+then
+ PS1="$PS $branch\$ "
+else
+ PS1="$PS\$ "
+fi