I do this often after shelling out to bash
$ git grep 'banner-image' | grep mb3
Can I do it without leaving emacs?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
I have counsel (and ivy and swiper and ivy-hydra) loaded, and have "ctrl-c j" bound to
counsel-git-grep, which works well for the LHS of your pipeline. It is not clear if the RHS of your pipeline is trying to match more of the line or the filename. If the former then I would tend to add a space and mb3, if the latter then I would use "ctrl-c ctrl-o"
ivy-occur to save the git grep output in a buffer, and then use "ctrl-s" to search this new buffer for mb3, pressing enter to visit the place.
All of these packages are available from melpa.org.