aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-06-19 14:18:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-06-19 14:18:10 +1200
commit7aaaa8c99e55a5c9b996a56b4e0b23b7b3d6a230 (patch)
tree82bbf25b07d9d2a0247aea274feccc7fc882521f /sh
parentAdd colors to gcc output (diff)
downloaddotfiles-7aaaa8c99e55a5c9b996a56b4e0b23b7b3d6a230.tar.gz
dotfiles-7aaaa8c99e55a5c9b996a56b4e0b23b7b3d6a230.zip
Don't bother checking for grep --color
Diffstat (limited to 'sh')
-rw-r--r--sh/profile.d/grep.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/sh/profile.d/grep.sh b/sh/profile.d/grep.sh
index 2cc96545..d8b113c3 100644
--- a/sh/profile.d/grep.sh
+++ b/sh/profile.d/grep.sh
@@ -1,14 +1,10 @@
+# Define and store appropriate colors for grep(1)
+GREP_COLORS='ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36'
+export GREP_COLORS
+
# Store grep(1)'s --help output in a variable
grep_help=$(grep --help 2>/dev/null)
-# Define and store appropriate colors for grep(1) if applicable
-case $grep_help in
- *--color*)
- GREP_COLORS='ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36'
- export GREP_COLORS
- ;;
-esac
-
# Use GREP_OPTIONS to add some useful options to grep(1) calls if applicable
GREP_OPTIONS=
case $grep_help in