summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc6
1 files changed, 5 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index 11528f7..a456bd1 100644
--- a/.bashrc
+++ b/.bashrc
@@ -25,5 +25,9 @@ alias horizons='telnet horizons.jpl.nasa.gov 6775' # a NASA server providing da
GOPATH=$HOME/go
PATH=$PATH:~/bin
-PS1='[\u@\h \W]\$ '
+parse_git_branch() {
+ git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
+}
+
+PS1='[\u@\h$(parse_git_branch) \W]\$ '