2010-06-11 09:34:46 +00:00
|
|
|
# color-grep initialization
|
|
|
|
|
|
|
|
# Skip the rest for noninteractive shells.
|
|
|
|
[ -z "$PS1" ] && return
|
|
|
|
|
|
|
|
COLORS=
|
|
|
|
|
|
|
|
[ -e "/etc/GREP_COLORS" ] && COLORS="/etc/GREP_COLORS"
|
|
|
|
|
|
|
|
if [ -n "$COLORS" ]; then
|
|
|
|
grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
|
|
|
|
fi
|
|
|
|
|
2010-06-07 15:25:12 +00:00
|
|
|
alias grep='grep --color=auto' 2>/dev/null
|