Using type for checking if hg present instead of which

This commit is contained in:
Anton 2016-07-13 00:28:35 +04:00 committed by GitHub
commit aa00bce564

View file

@ -127,9 +127,8 @@ prompt_git() {
fi
}
prompt_hg() {
which hg > /dev/null 2>&1
if [[ $? -ne 0 ]]; then
prompt_hg()
if ! type hg &> /dev/null ; then
return
fi
local rev status