From efe21261d031b4836f64112a899706322acd26b0 Mon Sep 17 00:00:00 2001 From: robertoaceves Date: Tue, 27 Aug 2024 02:13:47 -0400 Subject: fix(grep): remove duplicate options (#12639) --- lib/grep.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/grep.zsh') diff --git a/lib/grep.zsh b/lib/grep.zsh index 54e0f694e..5b3dec87e 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -24,8 +24,8 @@ else if [[ -n "$GREP_OPTIONS" ]]; then # export grep, egrep and fgrep settings alias grep="grep $GREP_OPTIONS" - alias egrep="grep -E $GREP_OPTIONS" - alias fgrep="grep -F $GREP_OPTIONS" + alias egrep="grep -E" + alias fgrep="grep -F" # write to cache file if cache directory is writable if [[ -w "$ZSH_CACHE_DIR" ]]; then -- cgit v1.2.3-70-g09d2 From 6a10a4d6a3004b39e0bbcff530f97c95cad5127d Mon Sep 17 00:00:00 2001 From: Henrik Holmboe Date: Tue, 8 Oct 2024 20:29:30 +0200 Subject: feat(grep): exclude Python virtualenv from `grep` (#12685) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- lib/grep.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/grep.zsh') diff --git a/lib/grep.zsh b/lib/grep.zsh index 5b3dec87e..1a70de7e5 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -10,7 +10,7 @@ else } # Ignore these folders (if the necessary grep flags are available) - EXC_FOLDERS="{.bzr,CVS,.git,.hg,.svn,.idea,.tox}" + EXC_FOLDERS="{.bzr,CVS,.git,.hg,.svn,.idea,.tox,.venv,venv}" # Check for --exclude-dir, otherwise check for --exclude. If --exclude # isn't available, --color won't be either (they were released at the same -- cgit v1.2.3-70-g09d2