diff options
author | Robby Russell <robby@planetargon.com> | 2015-10-03 14:33:10 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2015-10-03 14:33:10 -0700 |
commit | 5d24ba4228256acabf543879ba2d63eebec2ff75 (patch) | |
tree | f15d2b04e1ca5e4e1ccff2678fdec346e6fffbfd /lib/misc.zsh | |
parent | 30c7ef7d2b3d1b5f63efaccad027c111a1ed0de9 (diff) | |
parent | 775ac3ad9fefd524f217dedaf09f7fb40a18b6ee (diff) | |
download | zsh-5d24ba4228256acabf543879ba2d63eebec2ff75.tar.gz zsh-5d24ba4228256acabf543879ba2d63eebec2ff75.tar.bz2 zsh-5d24ba4228256acabf543879ba2d63eebec2ff75.zip |
Merge pull request #3165 from hbin/fix-alias-afind-osx
The executable command on Mac OSX is 'ack' rather than 'ack-grep'.
Diffstat (limited to 'lib/misc.zsh')
-rw-r--r-- | lib/misc.zsh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/misc.zsh b/lib/misc.zsh index bdb884046..223d61509 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -22,7 +22,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 |