From 6745a948b608714cc146e360eb597456e76c0f88 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 14 Sep 2012 20:13:00 +0900 Subject: [PATCH] update __my_ps1_git --- bashrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 53318a1..c94184c 100755 --- a/bashrc +++ b/bashrc @@ -567,11 +567,13 @@ __my_ps1_moc(){ return $last } test -r /usr/share/git/git-prompt.sh && . /usr/share/git/git-prompt.sh +GIT_PS1_SHOWDIRTYSTATE=t +GIT_PS1_SHOWUPSTREAM=t __my_ps1_git(){ local last=$? null type __git_ps1 || return $last - null git status || return $last - test -n "`git status -s -uno`" && local star=\* + null git status || return $last # __gitdir seems to be able to be used + #test -n "`git status -s -uno`" && local star=\* # done by SHOWDIRTYSTATE __git_ps1 "[GIT:$(__try_exec git config --get user.name):%s${star}]" return $last }