summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVital Kolas <vital.kolas@gmail.com>2016-05-12 10:40:24 +0300
committerMarc Cornellà <marc.cornella@live.com>2020-03-01 13:51:52 +0100
commitb6f2cfdb93627ca82ced24aaddb122b3a76a2638 (patch)
tree57c687f2d162c8ee96d4f7c2ea95400ebedf7e14 /lib
parent498cd722b39215be04468f291a23b6a76b75b095 (diff)
downloadzsh-b6f2cfdb93627ca82ced24aaddb122b3a76a2638.tar.gz
zsh-b6f2cfdb93627ca82ced24aaddb122b3a76a2638.tar.bz2
zsh-b6f2cfdb93627ca82ced24aaddb122b3a76a2638.zip
Exclude .idea folder from grep search scope
Diffstat (limited to 'lib')
-rw-r--r--lib/grep.zsh10
1 files 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