Blob Blame History Raw
# 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

alias grep='grep --color=auto' 2>/dev/null