Commit 2e6e100a authored by Adam Harvey's avatar Adam Harvey
Browse files

Prefer ggrep for grep invocations that use GNU extensions.

parent fa59fd51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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() {
+1 −1
Original line number Diff line number Diff line
@@ -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() {
+1 −1
Original line number Diff line number Diff line
@@ -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