瀏覽代碼

update __my_ps1_git

pull/1/head
10sr 12 年之前
父節點
當前提交
6745a948b6
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      bashrc

+ 4
- 2
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
}


Loading…
取消
儲存