Enable --color=auto for grep in FreeBSD
[grml-etc-core.git] / etc / zsh / zshrc
index 30f1550..ec93bdf 100644 (file)
@@ -339,7 +339,8 @@ if ls --help 2> /dev/null | grep -q GNU; then
 elif [[ $OSTYPE == freebsd* ]]; then
     ls_options=( -G )
 fi
-if grep --help 2> /dev/null | grep -q GNU; then
+if grep --help 2> /dev/null | grep -q GNU || \
+   [[ $OSTYPE == freebsd* ]]; then
     grep_options=( --color=auto )
 fi