Doom doctor (for vertico) complains about a non-PCRE grep even when PCRE rg is present

What happened?

New Doom install (macOS Ventura, emacs-mac port), ripgrep installed through homebrew.

Ran doom doctor, got:

    > :completion vertico
      ! The installed grep binary was not built with support for PCRE lookaheads

What did you expect to happen?

Initially I was confused - my homebrew-provided rg has PCRE lookahead support. However, looking at modules/completion/vertico/doctor.el, there are doctor checks for both grep and rg, and only the grep check fails (because macOS’s system grep is now very old).

So, my questions is: if rg is present, does it matter that grep doesn’t support lookahead?

If it doesn’t matter, then either the doctor tests could be slightly refactored to reflect this, or a note could be made in the docs to reassure OCD folks like me who are determined to get a clean bill of health from doom doctor.

If it does matter then I’ll have to install a newer/better grep.

Steps to reproduce

From a new install (macOS Ventura)

  1. doom install
  2. set init.el to use vertico module
  3. doom sync && doom doctor

System information


Loading data dump...

Not sure if you found a solution for this since Aug 23rd, but the same error occurs even if you install a newer/better grep from homebrew - I’ve tried that, and still the same happens. The homebrew installs in /usr/local/Cellar/grep/ver/bin, but for reasons I’ve been unable to decipher, doom doctor (and vertico) still calls on the built in grep…

I’m still not sure if my non-compliant grep is a problem, but it’s not a problem in practice because my compliant rg is the one being used.

Re: doom not picking up the brew-installed grep, I guess that’s a $PATH issue? You can see your path in .emacs.d/.local/env.

A bit late but on macOS it seems brew installs grep as ggrep and it has lookahead support. However I don’t know how to make Doom call into that command instead of calling to grep which I guess is the system grep

I run into the same issue, searched on Discord and here, couldn’t find a solution.

Anyone figure it out yet?

I also have grep (BSD), ggrep (homebrew), and rg installed via source with prce2 feature flag.

Not sure how to instruct vertico to use rg.

If you run brew info grep it will suggest to add /opt/homebrew/opt/grep/libexec/gnubin to your path. With that vertico will use your brew installed grep.