From 96bd555f132aa72ee8682ff13fcbef41760c6833 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 12 Sep 2012 13:21:44 +0900 Subject: [PATCH 1/2] add gitignore for global --- gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 gitignore diff --git a/gitignore b/gitignore new file mode 100644 index 0000000..2fae5b4 --- /dev/null +++ b/gitignore @@ -0,0 +1 @@ +\#* 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 2/2] 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(){