aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--share/functions/grep.fish3
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
-