From ad9cdd0c82440c6904da46be74ad50665c82ab45 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 12 Sep 2012 13:34:27 +0900 Subject: [PATCH] show star when git rep isnt clean --- bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index d50ab89..e0cc3b1 100755 --- a/bashrc +++ b/bashrc @@ -569,7 +569,9 @@ test -r /usr/share/git/git-prompt.sh && . /usr/share/git/git-prompt.sh __my_ps1_git(){ local last=$? null type __git_ps1 || return $last - __try_exec __git_ps1 "[GIT:$(__try_exec git config --get user.name):%s]" + null git status || return $last + test -n "`git status -s -uno`" && local star=\* + __git_ps1 "[GIT:$(__try_exec git config --get user.name):%s${star}]" return $last } __my_ps1_ipaddr(){