diff options
author | Aaron Gyes <me@aaron.gy> | 2016-02-20 10:26:50 -0800 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2016-02-20 21:11:40 +0100 |
commit | 613739ba072deffb7c0447de02c4a5a3ce296add (patch) | |
tree | cd14a921fcced4cf59643dc7a86aea15d28e81c0 /share | |
parent | 947f659f969b318eb7757656e28188e5d2d0f5cf (diff) |
Try to just see if grep is happy with --color=auto, or not, as the --help exit status varies in BSD vs. GNU.
Diffstat (limited to 'share')
-rw-r--r-- | share/functions/grep.fish | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/share/functions/grep.fish b/share/functions/grep.fish index 73f21922..bedf18be 100644 --- a/share/functions/grep.fish +++ b/share/functions/grep.fish @@ -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 - |