Change the test expression of Git
authorxiaogaozi <gaochangjian@gmail.com>
Fri, 4 May 2012 14:51:48 +0000 (22:51 +0800)
committerxiaogaozi <gaochangjian@gmail.com>
Fri, 4 May 2012 14:51:48 +0000 (22:51 +0800)
.gitignore
themes/base.theme.bash

index 32e62de..25042cb 100644 (file)
@@ -7,3 +7,4 @@ aliases/custom.aliases.bash
 lib/custom.bash
 plugins/custom.plugins.bash
 *.swp
+.*.un~
index 15bd4aa..f096fda 100644 (file)
@@ -31,7 +31,7 @@ RBFU_THEME_PROMPT_PREFIX=' |'
 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