From 4cfcf09cefbcd50e6aab809fa158bfd25bdde547 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 7 Jan 2015 14:40:28 +0100 Subject: [PATCH] grep: use array for options --- lib/grep.zsh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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.