How exclude filetype? #168
-
Thanks for rga! I search text, but i want exclude file with filetype srt. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Most parameters work the same as in ripgrep. Just replace rg with rga. Quoting ChatGPT: To exclude rg --glob '!*.srt' <pattern> In the command above, replace You can add more file types to be excluded by adding more rg --glob '!*.srt' --glob '!*.txt' <pattern> Remember that the |
Beta Was this translation helpful? Give feedback.
Most parameters work the same as in ripgrep. Just replace rg with rga. Quoting ChatGPT:
To exclude
.srt
files while usingripgrep
, you need to use the--glob
flag with the!
operator which stands for "not". Here's an example command:In the command above, replace
<pattern>
with the pattern you're searching for. This will search for your pattern in all files except those with the.srt
extension.You can add more file types to be excluded by adding more
--glob
parameters. For example, to exclude both.srt
and.txt
files, you can use:Remember that the
!
operator negates the match, so!*.srt
matches anything that is no…