Reputation: 5472
I'm trying to figure out how to search within files containing only a certain extension and within a certain directory. I've tried */app/*,*.jade
, but that seems to search for anything within the app directory OR in any other directory given its extension is .jade
. I just need a method to filter for files that satisfy both conditions. I feel like the obvious solution would simply be an AND character in place of the comma (which seems to act as an OR), but I'm not sure if the syntax incorporates such a feature. Anyone know if it does, or can offer an alternative solution for my use case? Thanks.
Upvotes: 1
Views: 642
Reputation: 22791
You are indeed correct that the Find in Files
functionality allows you to provide a comma separated list of search terms and they are effectively an OR
operation.
Note that you can also prefix a term with -
to make it mean BUT NOT
, which you can use to filter results out.
In order to find only files of a certain extension AND
in a certain path, you need to create a search term that includes both of them at the same time:
*/app/*.jade
Upvotes: 3