From 8904d44d8dbadfba3cfe594ce3696ba1ec433660 Mon Sep 17 00:00:00 2001 From: Arnaud Gomes Date: Wed, 9 Apr 2014 13:50:45 +0200 Subject: [PATCH] Fix grep.zsh: grep on FreeBSD 10 does not have --exclude-dir option. --- lib/grep.zsh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/grep.zsh b/lib/grep.zsh index 977435ee4..da633366e 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -5,9 +5,12 @@ # avoid VCS folders GREP_OPTIONS= -for PATTERN in .cvs .git .hg .svn; do - GREP_OPTIONS+="--exclude-dir=$PATTERN " -done +if [ $(uname) != "FreeBSD" ] +then + for PATTERN in .cvs .git .hg .svn; do + GREP_OPTIONS+="--exclude-dir=$PATTERN " + done +fi GREP_OPTIONS+="--color=auto" export GREP_OPTIONS="$GREP_OPTIONS" export GREP_COLOR='1;32'