6a10a4d6a3004b39e0bbcff530f97c95cad5127d

Author
Henrik Holmboe <henrik@holmboe.se>
Committer
GitHub <noreply@github.com>
Date

Message

feat(grep): exclude Python virtualenv from `grep` (#12685)

The convention to use `.venv` or `venv` directories for Python virtualenvs is widespread. 
This directory is huge and gives very little value when grepping in a source code directory.

Co-authored-by: Marc Cornellà <marc@mcornella.com>

Diff

 1diff --git a/lib/grep.zsh b/lib/grep.zsh
 2index 5b3dec87e295e5f8d27b33d509166212397ad289..1a70de7e58b1bf001111c70c42ccb2926c87f141 100644
 3--- a/lib/grep.zsh
 4+++ b/lib/grep.zsh
 5@@ -10,7 +10,7 @@ else
 6     }
 7 
 8     # Ignore these folders (if the necessary grep flags are available)
 9-    EXC_FOLDERS="{.bzr,CVS,.git,.hg,.svn,.idea,.tox}"
10+    EXC_FOLDERS="{.bzr,CVS,.git,.hg,.svn,.idea,.tox,.venv,venv}"
11 
12     # Check for --exclude-dir, otherwise check for --exclude. If --exclude
13     # isn't available, --color won't be either (they were released at the same