commit | cd7eaaa066d74588a9508c335240ed3e0248fab3 | [log] [tgz] |
---|---|---|
author | xiaogaozi <gaochangjian@gmail.com> | 周五 5月 04 22:51:48 2012 +0800 |
committer | xiaogaozi <gaochangjian@gmail.com> | 周五 5月 04 22:51:48 2012 +0800 |
tree | 3af3794ef743da474b341f679bcff324b8be8f97 | |
parent | 773370bacd486a7b6e156cf916bb821db903aaab [diff] |
Change the test expression of Git
diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 15bd4aa..f096fda 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash
@@ -31,7 +31,7 @@ RBFU_THEME_PROMPT_SUFFIX='|' function scm { - if [[ -d .git ]]; then SCM=$SCM_GIT + if [[ -f .git/HEAD ]]; then SCM=$SCM_GIT elif [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$SCM_GIT elif [[ -d .hg ]]; then SCM=$SCM_HG elif [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$SCM_HG