From 1a79b08644b1ae54969cd0f057626cc4e884d5a1 Mon Sep 17 00:00:00 2001 From: Adam Batkin Date: Sat, 3 Oct 2015 22:36:22 -0400 Subject: [PATCH] Fix error when ack-grep is not found The `which` command may send output to stderr when the resulting path is not found (i.e. an error is encountered). That error output must be discarded. --- lib/misc.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index 223d61509..65bfba10c 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -22,7 +22,7 @@ alias _='sudo' alias please='sudo' ## more intelligent acking for ubuntu users -if which ack-grep > /dev/null; +if which ack-grep > /dev/null 2>&1; then alias afind='ack-grep -il' else