From aa00bce564862afb33f2ce142c14ff987e007dcf Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 13 Jul 2016 00:28:35 +0400 Subject: [PATCH] Using type for checking if hg present instead of which --- themes/agnoster.zsh-theme | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 6aa484760..7fb7d108e 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -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