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"