I could really use a better workflow to refine grep matches. Has anyone made a tool that combines grep (regex search) with fzf (multiple positive/negative patterns)? What I really want is something like:

  grep pattern1 **/* | grep pattern2 | grep -v exclude_these | grep -v also_exclude
The problem is this loses filenames and context lines in the output. I want to apply several positive and negative regexes, and only at the very end annotate with filenames and context. Anyone have a good workflow for this?
I do things like that inside Emacs with the consult-grep command from the Consult package, combined with the Orderless matching style, Embark to collect the results in a buffer. This has several advantages over the command line:

- Interactivity: the results are updated live as you type, so you catch typos sooner and can tweak the search terms as you go.

- The buffer of search results you collect with Embark is not dead text like it would be in the terminal, instead, each line is a link to the corresponding file taking you to the line that matched.

- Wgrep lets you edit all the matching lines in place!

Packages referenced:

1. Consult: https://github.com/minad/consult/

2. Orderless: https://github.com/oantolin/orderless

3. Embark: https://github.com/oantolin/embark

4. Wgrep: http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep....