From 34e9525f1a14543e04408ec2698a7dc8d5b0889e Mon Sep 17 00:00:00 2001 From: "Carlos E. Reynosa-Nunez" Date: Sat, 4 Oct 2014 17:13:23 -0700 Subject: [PATCH] Added a flag within the base theme to turn version control checks completely off or on. --- themes/base.theme.bash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 54ab2f54..fc32527c 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -1,6 +1,9 @@ #!/usr/bin/env bash THEME_PROMPT_HOST='\H' + +SCM_CHECK=${SCM_CHECK:=true} + SCM_THEME_PROMPT_DIRTY=' ✗' SCM_THEME_PROMPT_CLEAN=' ✓' SCM_THEME_PROMPT_PREFIX=' |' @@ -31,7 +34,9 @@ RBFU_THEME_PROMPT_PREFIX=' |' RBFU_THEME_PROMPT_SUFFIX='|' function scm { - if [[ -f .git/HEAD ]]; then SCM=$SCM_GIT + + if [[ "$SCM_CHECK" = false ]]; then SCM=$SCM_NONE + elif [[ -f .git/HEAD ]]; then SCM=$SCM_GIT elif which git &> /dev/null && [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$SCM_GIT elif [[ -d .hg ]]; then SCM=$SCM_HG elif which hg &> /dev/null && [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$SCM_HG