From b6f2cfdb93627ca82ced24aaddb122b3a76a2638 Mon Sep 17 00:00:00 2001
From: Vital Kolas <vital.kolas@gmail.com>
Date: Thu, 12 May 2016 10:40:24 +0300
Subject: [PATCH] Exclude .idea folder from grep search scope

---
 lib/grep.zsh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/grep.zsh b/lib/grep.zsh
index abc1650a1..886e36a8d 100644
--- a/lib/grep.zsh
+++ b/lib/grep.zsh
@@ -10,13 +10,13 @@ if grep-flag-available --color=auto; then
     GREP_OPTIONS+=" --color=auto"
 fi
 
-# ignore VCS folders (if the necessary grep flags are available)
-VCS_FOLDERS="{.bzr,CVS,.git,.hg,.svn}"
+# ignore these folders (if the necessary grep flags are available)
+EXC_FOLDERS="{.bzr,CVS,.git,.hg,.svn,.idea}"
 
 if grep-flag-available --exclude-dir=.cvs; then
-    GREP_OPTIONS+=" --exclude-dir=$VCS_FOLDERS"
+    GREP_OPTIONS+=" --exclude-dir=$EXC_FOLDERS"
 elif grep-flag-available --exclude=.cvs; then
-    GREP_OPTIONS+=" --exclude=$VCS_FOLDERS"
+    GREP_OPTIONS+=" --exclude=$EXC_FOLDERS"
 fi
 
 # export grep settings
@@ -24,5 +24,5 @@ alias grep="grep $GREP_OPTIONS"
 
 # clean up
 unset GREP_OPTIONS
-unset VCS_FOLDERS
+unset EXC_FOLDERS
 unfunction grep-flag-available