Try to just see if grep is happy with --color=auto, or not, as the --help exit status varies in BSD vs. GNU.

This commit is contained in:
Aaron Gyes 2016-02-20 10:26:50 -08:00 committed by Fabian Homborg
parent 947f659f96
commit 613739ba07

View file

@ -2,9 +2,8 @@
# Match colors for grep, if supported
#
if command grep --color=auto --help 1>/dev/null 2>/dev/null
if echo | command grep --color=auto "" >/dev/null 2>&1
function grep
command grep --color=auto $argv
end
end