summaryrefslogtreecommitdiff
path: root/lib/misc.zsh
diff options
context:
space:
mode:
authorBin Huang <huangbin88@foxmail.com>2015-07-11 09:32:05 +0800
committerBin Huang <huangbin88@foxmail.com>2015-07-11 09:32:05 +0800
commit775ac3ad9fefd524f217dedaf09f7fb40a18b6ee (patch)
treed740679b627d985a7c1bd4b0e2c7444bb30545c7 /lib/misc.zsh
parent3ea33841863c4f5f22a27e64ae7950d901b674af (diff)
downloadzsh-775ac3ad9fefd524f217dedaf09f7fb40a18b6ee.tar.gz
zsh-775ac3ad9fefd524f217dedaf09f7fb40a18b6ee.tar.bz2
zsh-775ac3ad9fefd524f217dedaf09f7fb40a18b6ee.zip
The executable command on Mac OSX is 'ack' rather than 'ack-grep'.
Diffstat (limited to 'lib/misc.zsh')
-rw-r--r--lib/misc.zsh7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/misc.zsh b/lib/misc.zsh
index 6d1a64e8d..9d458ab28 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