775ac3ad9fefd524f217dedaf09f7fb40a18b6ee

Author
Bin Huang <huangbin88@foxmail.com>
Committer
Bin Huang <huangbin88@foxmail.com>
Date

Message

The executable command on Mac OSX is 'ack' rather than 'ack-grep'.

Diff

 1diff --git a/lib/misc.zsh b/lib/misc.zsh
 2index 6d1a64e8dbc540fcbe3a84df20082d2416a4e1de..9d458ab28d2169bd9c27241c747a81dd60d9f7ee 100644
 3--- a/lib/misc.zsh
 4+++ b/lib/misc.zsh
 5@@ -18,7 +18,12 @@ alias _='sudo'
 6 alias please='sudo'
 7 
 8 ## more intelligent acking for ubuntu users
 9-alias afind='ack-grep -il'
10+if which ack-grep > /dev/null;
11+then
12+  alias afind='ack-grep -il'
13+else
14+  alias afind='ack -il'
15+fi
16 
17 # only define LC_CTYPE if undefined
18 if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then