aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sh/profile.d/grep.sh8
1 files 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,10 +9,14 @@ 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
GREP_OPTIONS=${GREP_OPTIONS:+$GREP_OPTIONS }'--exclude='$exclude