Merge remote-tracking branch 'erichs/fix_pull_121'
diff --git a/.gitignore b/.gitignore
index 32e62de..25042cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
lib/custom.bash
plugins/custom.plugins.bash
*.swp
+.*.un~
diff --git a/plugins/available/rbenv.plugin.bash b/plugins/available/rbenv.plugin.bash
index bd3f78e..c45d714 100644
--- a/plugins/available/rbenv.plugin.bash
+++ b/plugins/available/rbenv.plugin.bash
@@ -2,7 +2,7 @@
# Load rbebv, if you are using it
export PATH="$HOME/.rbenv/bin:$PATH"
-eval "$(rbenv init -)"
+[[ `which rbenv` ]] && eval "$(rbenv init -)"
# Load the auto-completion script if rbenv was loaded.
-source ~/.rbenv/completions/rbenv.bash
+[[ -e ~/.rbenv/completions/rbenv.bash ]] && source ~/.rbenv/completions/rbenv.bash
\ No newline at end of file
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