5d24ba4228256acabf543879ba2d63eebec2ff75

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #3165 from hbin/fix-alias-afind-osx

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

Diff

 1diff --git a/lib/misc.zsh b/lib/misc.zsh
 2index bdb884046af81a7d108593aeec55985733a82c8d..223d61509d88baafc3d793d39401b241a6696d00 100644
 3--- a/lib/misc.zsh
 4+++ b/lib/misc.zsh
 5@@ -22,7 +22,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