Ignoring .js file only if corresponding .ts file present #2465
-
Hi, Is there a way to ignore generated Example:
Given above file structure, I want to ignore only I use Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Nope. There is no way to hook into ripgrep's filtering logic and introduce a dependency based on whether some other file with a similar name exists. My suggestion would be to add your js files that your want to ignore to an |
Beta Was this translation helpful? Give feedback.
-
Thanks for confirming that I'm not missing any existing option. Yeah, my thought is to generate ignore file dynamically for every search or filter out during the UI creation time from the JSON results. Later is little trickier as Thanks |
Beta Was this translation helpful? Give feedback.
Nope. There is no way to hook into ripgrep's filtering logic and introduce a dependency based on whether some other file with a similar name exists.
My suggestion would be to add your js files that your want to ignore to an
.rgignore
file. It seems likely you could write a relatively simple program to walk your tree and produce those ignore files automatically.