Describe your feature request
I would like a way to leverage the type filters (-t/-T) combined with directories. I've discovered (through trial and error, then checking the source) that the globbing for --type-add only seems to match files, not entire paths.
Use-case: I keep a number of --type-add flags in my ~/.ripgreprc for categorizing common types across projects and languages. One that I use frequently is test (almost the inverse of the src example from the manpage) based on common filenames.
# Create a "test" type for common test files, typically for use with -t/-T
--type-add=test:*.test.*
--type-add=test:*Test.*
--type-add=test:*Tests.*
While this catches a pretty good amount of test infrastructure, it frequently misses things like fixtures and other supporting files, in addition to some unconventionally-named test files. While I realize the --glob flag can have an equivalent effect per-invocation, I find a lot of utility value in quickly running rg foo -Ttest and having it pre-set through my rc file to cover 99% of cases.
I checked for open issues/requests and didn't see anything that covered this, although there were a couple older ones in adjacent areas that were closed due to lack of feedback.
Thanks for considering this!
Describe your feature request
I would like a way to leverage the type filters (
-t/-T) combined with directories. I've discovered (through trial and error, then checking the source) that the globbing for--type-addonly seems to match files, not entire paths.Use-case: I keep a number of
--type-addflags in my~/.ripgreprcfor categorizing common types across projects and languages. One that I use frequently istest(almost the inverse of thesrcexample from the manpage) based on common filenames.While this catches a pretty good amount of test infrastructure, it frequently misses things like fixtures and other supporting files, in addition to some unconventionally-named test files. While I realize the
--globflag can have an equivalent effect per-invocation, I find a lot of utility value in quickly runningrg foo -Ttestand having it pre-set through my rc file to cover 99% of cases.I checked for open issues/requests and didn't see anything that covered this, although there were a couple older ones in adjacent areas that were closed due to lack of feedback.
Thanks for considering this!