diff --git a/lib/grep.zsh b/lib/grep.zsh index c7e8bbffc..af78c3d7d 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -2,15 +2,14 @@ VCS_FOLDERS="{.bzr,.cvs,.git,.hg,.svn}" _setup_grep_alias() { - # Is grep argument $1 available? - grep-flag-available() { - echo | grep $1 "" >/dev/null 2>&1 - } - local GREP_OPTIONS # Color grep results. GREP_OPTIONS=(--color=auto) + # Is grep argument $1 available? + grep-flag-available() { + echo | grep $1 "" >/dev/null 2>&1 + } if grep-flag-available --exclude-dir=.cvs; then GREP_OPTIONS+=(--exclude-dir=$VCS_FOLDERS) elif grep-flag-available --exclude=.cvs; then