summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2014-03-22 16:07:51 -0700
committerRobby Russell <robby@planetargon.com>2014-03-22 16:07:51 -0700
commit393c805f7e3f9dff6adcf7c1d6a2e0b93e8a8dc6 (patch)
tree97dcd6e63a236553563cef53c28c3152e5b25f6d
parent668886e20376479961250c9c44b8c0673e62f11d (diff)
parent4f9cfee9bdfcab18bb83d17129f090a62dc05eac (diff)
downloadzsh-393c805f7e3f9dff6adcf7c1d6a2e0b93e8a8dc6.tar.gz
zsh-393c805f7e3f9dff6adcf7c1d6a2e0b93e8a8dc6.tar.bz2
zsh-393c805f7e3f9dff6adcf7c1d6a2e0b93e8a8dc6.zip
Merge pull request #1162 from nXqd/patch-1
avoid VCS folders
-rw-r--r--lib/grep.zsh8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/grep.zsh b/lib/grep.zsh
index 93c4270b6..25345bd06 100644
--- a/lib/grep.zsh
+++ b/lib/grep.zsh
@@ -2,5 +2,11 @@
# Color grep results
# Examples: http://rubyurl.com/ZXv
#
-export GREP_OPTIONS='--color=auto'
+
+# avoid VCS folders
+GREP_OPTIONS=
+for PATTERN in .cvs .git .hg .svn; do
+ GREP_OPTIONS+="--exclude-dir=$PATTERN "
+done
+export GREP_OPTIONS+='--color=auto '
export GREP_COLOR='1;32' \ No newline at end of file