From bfd8cd62a9f60f69d0f242d366f1df48ec9dbb92 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 30 Jul 2013 21:40:34 +1200 Subject: Place missing quotes --- bash/bashrc.d/grep.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bash/bashrc.d/grep.bash') diff --git a/bash/bashrc.d/grep.bash b/bash/bashrc.d/grep.bash index ee1bd386..f2586562 100644 --- a/bash/bashrc.d/grep.bash +++ b/bash/bashrc.d/grep.bash @@ -1,14 +1,14 @@ # Function returns calculated options for grep __grepopts() { local grepopts='-I' - local grephelp=$(grep --help 2>/dev/null) + local grephelp="$(grep --help 2>/dev/null)" [[ "$grephelp" == *--color* ]] \ && grepopts="${grepopts} --color=auto" [[ "$grephelp" == *--exclude* ]] \ && grepopts="${grepopts} --exclude=.git{,ignore,modules}" [[ "$grephelp" == *--exclude-dir* ]] \ && grepopts="${grepopts} --exclude-dir=.{cvs,git,hg,svn}" - printf '%s' $grepopts + printf '%s' "$grepopts" } # Alias grep with those options -- cgit v1.2.3