diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2019-10-20 09:18:54 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2019-10-20 09:19:38 -0400 |
| commit | d022051f5c4f1734204d180eaf93fbc9971810f3 (patch) | |
| tree | 304bbb927b3635b878531748d796bc27edf97938 /mkshrc | |
| parent | 97b8b23c403f152c7f995c037607869d21b97762 (diff) | |
| download | dotfiles-d022051f5c4f1734204d180eaf93fbc9971810f3.tar.gz dotfiles-d022051f5c4f1734204d180eaf93fbc9971810f3.tar.xz | |
Fix up my test for whether grep supports color
Diffstat (limited to 'mkshrc')
| -rw-r--r-- | mkshrc | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -53,8 +53,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'; |
