[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 :
|
#Un grep avec des couleurs :
|
||||||
#export GREP_COLOR=31
|
#export GREP_COLOR=31
|
||||||
#alias grep='grep --color=auto'
|
#alias grep='grep --color=auto'
|
||||||
GREP_OPTIONS="--color=auto"
|
GREP_OPT="--color=auto"
|
||||||
|
|
||||||
# avoid VCS folders (if the necessary grep flags are available)
|
# avoid VCS folders (if the necessary grep flags are available)
|
||||||
grep-flag-available() {
|
grep-flag-available() {
|
||||||
@ -60,17 +60,18 @@ grep-flag-available() {
|
|||||||
}
|
}
|
||||||
if grep-flag-available --exclude-dir=.cvs; then
|
if grep-flag-available --exclude-dir=.cvs; then
|
||||||
for PATTERN in .cvs .git .hg .svn; do
|
for PATTERN in .cvs .git .hg .svn; do
|
||||||
GREP_OPTIONS+=" --exclude-dir=$PATTERN"
|
GREP_OPT+=" --exclude-dir=$PATTERN"
|
||||||
done
|
done
|
||||||
elif grep-flag-available --exclude=.cvs; then
|
elif grep-flag-available --exclude=.cvs; then
|
||||||
for PATTERN in .cvs .git .hg .svn; do
|
for PATTERN in .cvs .git .hg .svn; do
|
||||||
GREP_OPTIONS+=" --exclude=$PATTERN"
|
GREP_OPT+=" --exclude=$PATTERN"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
unfunction grep-flag-available
|
unfunction grep-flag-available
|
||||||
|
|
||||||
export GREP_OPTIONS="$GREP_OPTIONS"
|
#export GREP_OPTIONS="$GREP_OPTIONS"
|
||||||
export GREP_COLOR='1;31'
|
export GREP_COLOR='1;31'
|
||||||
|
alias grep="grep $GREP_OPT"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user