From 775ac3ad9fefd524f217dedaf09f7fb40a18b6ee Mon Sep 17 00:00:00 2001 From: Bin Huang Date: Sat, 11 Jul 2015 09:32:05 +0800 Subject: [PATCH] The executable command on Mac OSX is 'ack' rather than 'ack-grep'. --- lib/misc.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index 6d1a64e8..9d458ab2 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -18,7 +18,12 @@ alias _='sudo' alias please='sudo' ## more intelligent acking for ubuntu users -alias afind='ack-grep -il' +if which ack-grep > /dev/null; +then + alias afind='ack-grep -il' +else + alias afind='ack -il' +fi # only define LC_CTYPE if undefined if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then