We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3285e4f commit a7f4f4dCopy full SHA for a7f4f4d
g
@@ -28,13 +28,14 @@ if command -v ack &>/dev/null; then
28
exec ack "$@"
29
fi
30
31
-# Fallback: egrep or grep
32
-for GREP in egrep grep; do
33
- if command -v ${GREP} &>/dev/null; then
34
- find . 2>/dev/null -type f -print0 | xargs -0 -P $(getconf _NPROCESSORS_ONLN) ${GREP} --binary-files=without-match --color=always -HI "$@" | ${GREP} . | less -iRnSFX
35
- exit ${PIPESTATUS[2]}
36
- fi
37
-done
+# Fallback: grep
+if command -v grep &>/dev/null; then
+ find . 2>/dev/null -type f -print0 | \
+ xargs -0 -P $(getconf _NPROCESSORS_ONLN) \
+ grep --binary-files=without-match --color=always --extended-regex -HI "$@" | \
+ grep . | less -iRnSFX
+ exit ${PIPESTATUS[2]}
38
+fi
39
40
printf 'no suitable tool found\n' >&2
41
exit 1
0 commit comments