Added a flag within the base theme to turn version control checks completely off or on.
parent
4d2a8fe62b
commit
34e9525f1a
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue