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 fi
} }
prompt_hg() { prompt_hg()
which hg > /dev/null 2>&1 if ! type hg &> /dev/null ; then
if [[ $? -ne 0 ]]; then
return return
fi fi
local rev status local rev status