I usually find myself when using helm-projectile-grep to narrow my search down to a specific file type.

For example: I do a search for "container" but only want to show the results in the .style files. I haven't been able to find if you can do this with helm-projectile-grep but it does seem like it should be possible.


It is possible with the helm-ag package, which passes every "--" prefixed fields to ag as CLI arguments.

To filter by file type use its extension as an argument. So calling helm-projectil-ag with:

--style container

will do the trick.

Additional examples:

--hidden search-pattern

Will include hidden files during search for search-pattern

--ignore=*.html container

Will ignore all html files. Note that --ignore accepts glob pattern instead of regexp.


To use helm-ag you should install ag, which is multi-platform, uses perl-like regexp by default and way faster than grep.

  • this doesnt work with helm-projectile-ag
    – RichieHH
    Aug 23 '20 at 19:57
  • @RichieHH yes, and I have never stated that.
    – atevm
    Aug 26 '20 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.