aboutsummaryrefslogtreecommitdiff
path: root/shell/aliases
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2019-10-20 09:18:54 -0400
committerMitch Riedstra <mitch@riedstra.us>2019-10-20 09:19:38 -0400
commitd022051f5c4f1734204d180eaf93fbc9971810f3 (patch)
tree304bbb927b3635b878531748d796bc27edf97938 /shell/aliases
parent97b8b23c403f152c7f995c037607869d21b97762 (diff)
downloaddotfiles-d022051f5c4f1734204d180eaf93fbc9971810f3.tar.gz
dotfiles-d022051f5c4f1734204d180eaf93fbc9971810f3.tar.xz
Fix up my test for whether grep supports color
Diffstat (limited to 'shell/aliases')
-rw-r--r--shell/aliases3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/aliases b/shell/aliases
index 120db9c..b8f7548 100644
--- a/shell/aliases
+++ b/shell/aliases
@@ -40,8 +40,7 @@ setcoloraliases() {
alias lm='CLICOLOR_FORCE="1" ls -l | less -r';
fi
- grep --help | grep fucks - >/dev/null 2>&1
- if [ $? -eq 0 ] ; then
+ if echo "color test" | grep -q --color=auto "color test" >/dev/null 2>&1 ; then
alias grep="grep --color=auto";
alias egrep='egrep --color=auto'
alias search='egrep --color=auto -rnI';