Commit 2e6e100a by Adam Harvey

Prefer ggrep for grep invocations that use GNU extensions.

parent fa59fd51
......@@ -44,7 +44,7 @@ usage() {
definitions() {
local query="$1"
ruby-build --definitions | grep -F "$query" || true
ruby-build --definitions | $(type -p ggrep grep | head -1) -F "$query" || true
}
indent() {
......
......@@ -43,7 +43,7 @@ potentially_new_packages() {
}
extract_urls() {
grep -hoe 'http[^"]\+#[^"]\+' "$@" | sort | uniq
$(type -p ggrep grep | head -1) -hoe 'http[^"]\+#[^"]\+' "$@" | sort | uniq
}
update() {
......
......@@ -115,7 +115,7 @@ assert_output() {
assert_output_contains() {
local expected="$1"
echo "$output" | grep -F "$expected" >/dev/null || {
echo "$output" | $(type -p ggrep grep | head -1) -F "$expected" >/dev/null || {
{ echo "expected output to contain $expected"
echo "actual: $output"
} | flunk
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment