aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-06-15 16:47:38 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-06-15 16:47:38 +1200
commit31d2e82aaba4255808a3a2105516a9ea2205f7d8 (patch)
treeb5ad22f44e6748ed965b111b5c3f27db7b58d84e /sh/profile.d
parentReset GREP_OPTIONS before building it (diff)
downloaddotfiles-31d2e82aaba4255808a3a2105516a9ea2205f7d8.tar.gz
dotfiles-31d2e82aaba4255808a3a2105516a9ea2205f7d8.zip
Add --binary-files to default grep(1) options
Diffstat (limited to 'sh/profile.d')
-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