From 31d2e82aaba4255808a3a2105516a9ea2205f7d8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 15 Jun 2015 16:47:38 +1200 Subject: Add --binary-files to default grep(1) options --- sh/profile.d/grep.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sh/profile.d/grep.sh b/sh/profile.d/grep.sh index c722f9fb..2cc96545 100644 --- a/sh/profile.d/grep.sh +++ b/sh/profile.d/grep.sh @@ -9,9 +9,13 @@ case $grep_help in ;; esac -# Use GREP_OPTIONS to add some useful --exclude and --exclude-dir options to -# grep(1) calls if applicable +# Use GREP_OPTIONS to add some useful options to grep(1) calls if applicable GREP_OPTIONS= +case $grep_help in + *--binary-files*) + GREP_OPTIONS=${GREP_OPTIONS:+$GREP_OPTIONS }'--binary-files=without-match' + ;; +esac case $grep_help in *--exclude*) for exclude in .gitignore .gitmodules ; do -- cgit v1.2.3