From 15d529157f6685e4cc9cc28781afa17ac0e5d4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 13 Dec 2014 19:36:57 +0100 Subject: [PATCH] Delete grep variables after we use them --- lib/grep.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/grep.zsh b/lib/grep.zsh index f7798f3dd..7cc20952e 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -6,7 +6,7 @@ GREP_OPTIONS="--color=auto" # avoid VCS folders (if the necessary grep flags are available) -local VCS_folders="{.bzr,.cvs,.git,.hg,.svn}" +VCS_folders="{.bzr,.cvs,.git,.hg,.svn}" grep-flag-available() { echo | command grep $1 "" >/dev/null 2>&1 @@ -16,7 +16,11 @@ if grep-flag-available --exclude-dir=.cvs; then elif grep-flag-available --exclude=.cvs; then GREP_OPTIONS+=" --exclude=$VCS_folders" fi -unfunction grep-flag-available export GREP_OPTIONS="$GREP_OPTIONS" export GREP_COLOR='1;32' + + +# cleanup +unset VCS_folders +unfunction grep-flag-available