Using idiomatic zsh way to check if hg is present

This commit is contained in:
Anton Kuroedov 2016-07-20 22:18:57 +03:00
commit 110f407915

View file

@ -128,9 +128,7 @@ prompt_git() {
}
prompt_hg() {
if ! type hg &> /dev/null; then
return
fi
(( $+commands[hg] )) || return
local rev status
if $(hg id >/dev/null 2>&1); then
if $(hg prompt >/dev/null 2>&1); then