Updated scm function to include `hg root` to check for Mercurial
Removed scm function from hawaii50.theme.bashpull/54/head
parent
dcb0ddec2f
commit
c7fcf20648
|
|
@ -24,6 +24,7 @@ function scm {
|
||||||
if [[ -d .git ]]; then SCM=$GIT
|
if [[ -d .git ]]; then SCM=$GIT
|
||||||
elif [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$GIT
|
elif [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$GIT
|
||||||
elif [[ -d .hg ]]; then SCM=$HG
|
elif [[ -d .hg ]]; then SCM=$HG
|
||||||
|
elif [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$HG
|
||||||
elif [[ -d .svn ]]; then SCM=$SVN
|
elif [[ -d .svn ]]; then SCM=$SVN
|
||||||
else SCM='NONE'
|
else SCM='NONE'
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -66,16 +66,6 @@ function ip {
|
||||||
echo $(ifconfig en1 | grep "inet " | awk '{ print $2 }')
|
echo $(ifconfig en1 | grep "inet " | awk '{ print $2 }')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Override function scm
|
|
||||||
function scm {
|
|
||||||
if [[ -d .git ]]; then SCM=$GIT
|
|
||||||
elif [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$GIT
|
|
||||||
elif [[ -n "$(hg summary 2> /dev/null)" ]]; then SCM=$HG
|
|
||||||
elif [[ -d .svn ]]; then SCM=$SVN
|
|
||||||
else SCM='NONE'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Displays the current virtualenv information
|
# Displays the current virtualenv information
|
||||||
function curr_virtualenv_info() {
|
function curr_virtualenv_info() {
|
||||||
[ ! -z "$VIRTUAL_ENV" ] && echo "`basename $VIRTUAL_ENV`"
|
[ ! -z "$VIRTUAL_ENV" ] && echo "`basename $VIRTUAL_ENV`"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue