diff options
Diffstat (limited to 'bash/bashrc.d/grep.bash')
-rw-r--r-- | bash/bashrc.d/grep.bash | 4 |
1 files changed, 2 insertions, 2 deletions
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 |