+grep-2.4.2 (Debian woody/3.0) compatibility.
authorlace <>
Sun, 11 Feb 2007 05:15:46 +0000 (05:15 +0000)
committerlace <>
Sun, 11 Feb 2007 05:15:46 +0000 (05:15 +0000)
.bashrc

diff --git a/.bashrc b/.bashrc
index ec98198..880fe75 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -173,7 +173,10 @@ for file in $HOME/.bookmarks.html;do
        export WWW_HOME="file://$HOME/"
        [ -r $file ] && export WWW_HOME="file://$file"
        done
-export GREP_OPTIONS="--binary-files=without-match --directories=skip --exclude=tags --exclude=TAGS --exclude=CVS"
+export GREP_OPTIONS="--binary-files=without-match --directories=skip"
+if echo x|GREP_OPTIONS="--exclude=y" grep -q x 2>/dev/null;then
+       export GREP_OPTIONS="$GREP_OPTIONS --exclude=tags --exclude=TAGS --exclude=CVS"
+fi
 if [ -n "$PS1" ];then  # set only in interactive sessions
        export PS1='[bash]${LOGNAME}@${HOSTNAME}:${PWD}# '
        export PS1='\[\017\]'"$PS1"     # \017=std charmap