[zsh] do not use GREP_OPTIONS
GREP_OPTIONS is now depracated, use alias instead
This commit is contained in:
parent
50461a952f
commit
81f0a3dc73
@ -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"
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user