From 81f0a3dc734e42683d6943e95ab000ddf06368e3 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Wed, 14 Jan 2015 15:31:09 +0100 Subject: [PATCH] [zsh] do not use GREP_OPTIONS GREP_OPTIONS is now depracated, use alias instead --- .zsh/00_basic.zsh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.zsh/00_basic.zsh b/.zsh/00_basic.zsh index 1ce71fc..2f86b82 100644 --- a/.zsh/00_basic.zsh +++ b/.zsh/00_basic.zsh @@ -52,7 +52,7 @@ setopt autocd #Un grep avec des couleurs : #export GREP_COLOR=31 #alias grep='grep --color=auto' -GREP_OPTIONS="--color=auto" +GREP_OPT="--color=auto" # avoid VCS folders (if the necessary grep flags are available) grep-flag-available() { @@ -60,17 +60,18 @@ grep-flag-available() { } if grep-flag-available --exclude-dir=.cvs; then for PATTERN in .cvs .git .hg .svn; do - GREP_OPTIONS+=" --exclude-dir=$PATTERN" + GREP_OPT+=" --exclude-dir=$PATTERN" done elif grep-flag-available --exclude=.cvs; then for PATTERN in .cvs .git .hg .svn; do - GREP_OPTIONS+=" --exclude=$PATTERN" + GREP_OPT+=" --exclude=$PATTERN" done fi unfunction grep-flag-available -export GREP_OPTIONS="$GREP_OPTIONS" +#export GREP_OPTIONS="$GREP_OPTIONS" export GREP_COLOR='1;31' +alias grep="grep $GREP_OPT"