From dffa817d4588645815ee226ee7c4462d6aea3fcc Mon Sep 17 00:00:00 2001 From: Moviuro Date: Thu, 11 Sep 2014 22:40:33 +0200 Subject: [PATCH] Actually check that grep options exist before adding them to the alias. --- etc/zsh/zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 9ce49ca..295e55d 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -350,8 +350,7 @@ if ls --color=auto / >/dev/null 2>&1; then elif ls -G / >/dev/null 2>&1; then ls_options=( -G ) fi -if grep --help 2> /dev/null | grep -q GNU || \ - [[ $OSTYPE == freebsd* ]]; then +if grep --color=auto -q "a" <<< "a"; then grep_options=( --color=auto ) fi -- 2.1.4