summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShi Yan <yanshi.403@gmail.com>2018-11-30 15:44:41 +1100
committerMarc Cornellà <marc.cornella@live.com>2020-03-01 13:53:04 +0100
commita8ed1c4e7ab7e7df3a1e903cde30f94bf6da3e39 (patch)
treed6873459f190ce66d3b5caca09264a7ed9ad09af
parentb4b50f20ac7a6645d04993ba8ca8695a41b8db7a (diff)
downloadzsh-a8ed1c4e7ab7e7df3a1e903cde30f94bf6da3e39.tar.gz
zsh-a8ed1c4e7ab7e7df3a1e903cde30f94bf6da3e39.tar.bz2
zsh-a8ed1c4e7ab7e7df3a1e903cde30f94bf6da3e39.zip
Ignore .tox folder in grep
-rw-r--r--lib/grep.zsh5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/grep.zsh b/lib/grep.zsh
index bd9dad41f..09042e13b 100644
--- a/lib/grep.zsh
+++ b/lib/grep.zsh
@@ -11,7 +11,7 @@ if grep-flag-available --color=auto; then
fi
# ignore these folders (if the necessary grep flags are available)
-EXC_FOLDERS="{.bzr,CVS,.git,.hg,.svn,.idea}"
+EXC_FOLDERS="{.bzr,CVS,.git,.hg,.svn,.idea,.tox}"
if grep-flag-available --exclude-dir=.cvs; then
GREP_OPTIONS+=" --exclude-dir=$EXC_FOLDERS"
@@ -25,6 +25,5 @@ alias egrep="egrep $GREP_OPTIONS"
alias fgrep="fgrep $GREP_OPTIONS"
# clean up
-unset GREP_OPTIONS
-unset EXC_FOLDERS
+unset GREP_OPTIONS EXC_FOLDERS
unfunction grep-flag-available