diff --git a/lib/grep.zsh b/lib/grep.zsh index 9a2c6f5a3..f36970f32 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -7,13 +7,14 @@ _setup_grep_alias() { echo | grep $1 "" >/dev/null 2>&1 } + local GREP_OPTIONS # Color grep results. - local GREP_OPTIONS="--color=auto" + GREP_OPTIONS=(--color=auto) if grep-flag-available --exclude-dir=.cvs; then - GREP_OPTIONS+=" --exclude-dir=$VCS_FOLDERS" + GREP_OPTIONS+=(--exclude-dir=$VCS_FOLDERS) elif grep-flag-available --exclude=.cvs; then - GREP_OPTIONS+=" --exclude=$VCS_FOLDERS" + GREP_OPTIONS+=(--exclude=$VCS_FOLDERS) fi # Re-define alias.