393c805f7e3f9dff6adcf7c1d6a2e0b93e8a8dc6
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #1162 from nXqd/patch-1
avoid VCS folders
Diff
1diff --git a/lib/grep.zsh b/lib/grep.zsh
2index 93c4270b60c808e2f59ad925b1ea657bb2cdf50c..25345bd0688d8e0d2295b4620e87d428f0a528c7 100644
3--- a/lib/grep.zsh
4+++ b/lib/grep.zsh
5@@ -2,5 +2,11 @@
6 # Color grep results
7 # Examples: http://rubyurl.com/ZXv
8 #
9-export GREP_OPTIONS='--color=auto'
10+
11+# avoid VCS folders
12+GREP_OPTIONS=
13+for PATTERN in .cvs .git .hg .svn; do
14+ GREP_OPTIONS+="--exclude-dir=$PATTERN "
15+done
16+export GREP_OPTIONS+='--color=auto '
17 export GREP_COLOR='1;32'