Improved prompt speed when hg is not installed.
Prevented bash from walking the path looking for hg when it is not installed during each prompt refresh.pull/275/head
parent
543384aeb4
commit
714f0e6099
|
|
@ -34,7 +34,7 @@ function scm {
|
||||||
if [[ -f .git/HEAD ]]; 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 [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$SCM_GIT
|
||||||
elif [[ -d .hg ]]; then SCM=$SCM_HG
|
elif [[ -d .hg ]]; then SCM=$SCM_HG
|
||||||
elif [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$SCM_HG
|
elif which hg &> /dev/null && [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$SCM_HG
|
||||||
elif [[ -d .svn ]]; then SCM=$SCM_SVN
|
elif [[ -d .svn ]]; then SCM=$SCM_SVN
|
||||||
else SCM=$SCM_NONE
|
else SCM=$SCM_NONE
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue