summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-07-17 21:11:41 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-07-17 21:11:41 +1200
commit15bb3d146698e9749b9516b1c56cdf4f4bf3f255 (patch)
treec1e8f1128e16a954a971c1de58fd173dc7d58122
parent53e6f574cda43cde6070cf627c280f076c1d2290 (diff)
downloaddotfiles-15bb3d146698e9749b9516b1c56cdf4f4bf3f255.tar.xz
Add git prompt
-rw-r--r--bashrc4
1 files changed, 2 insertions, 2 deletions
diff --git a/bashrc b/bashrc
index 61efd63..e4c4d1f 100644
--- a/bashrc
+++ b/bashrc
@@ -1,6 +1,7 @@
#!/usr/bin/bash
. /etc/bash_colours
+source /usr/share/git/completion/git-prompt.sh
# Force false terminal to get colour with (eg) ls within dvtm
if [ "$TERM" == "dvtm-256color" ]; then
@@ -22,10 +23,9 @@ man() {
}
###############
PS1="${BYellow}\
-┌[${BGreen}\u${BYellow}@${BBlue}\h${BYellow}][${BPurple}\W${BYellow}] ${BBlack}<\d \t>${BYellow}\n\
+┌[${BGreen}\u${BYellow}@${BBlue}\h${BYellow}][${BPurple}\W${BYellow}"'$(__git_ps1 " (%s)")'"] ${BBlack}<\d \t>${BYellow}\n\
└╼ \[${Colour_Off}\]"
###############
-
export GPG_TTY=$(tty)
export EDITOR=/usr/bin/vim
if [ $(which clang 2>/dev/null) ]; then