-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider supporting tar file #1112
Comments
Thanks for filing the ticket! I think this needs to be fleshed out quite a bit more though.
ripgrep has fairly sophisticated filtering support. How does that interact with treating tar files as if they were a directory? e.g., If there is an applicable |
For the case you mentioned, it should probably ignore the For how does that work... so it seems currently this is done via |
Right. This is probably blocked on refactoring and cleaning up the I'll leave this open for now, but I don't think this is going to happen any time soon. Moreover, I am still not quite convinced that this feature belongs in ripgrep. It's definitely something that folks have requested before though. |
I suggest adding a generic This would be really helpful for me, as I often need to grep through a massive corpus of text, hundreds of gigabytes in size. If I use ripgrep on the unpacked corpus, I get very useful information like filenames of the files that matched, and real line numbers. Unfortunately, because of spinning disk random access times this search usually takes over 6 hours to process the whole corpus. |
This comment has been minimized.
This comment has been minimized.
I've just found this wrapper that adds some compressed archives support. Older alternatives i know are Btw, it is not clear to me how the current |
@eadmaster It's pretty simple. You give ripgrep compressed files and it searches them:
It sounds like you're trying to give ripgrep compressed archive files. ripgrep doesn't support iterating over archives, even when they're uncompressed. It's orthogonal to |
I see, then the name |
Because the flag name is used in other tools, change causes churn and gzip is not the only supported compression format. |
Support for archives would be really nice! Apart from being able to search the occasional downloaded |
I would love to see this implemented. |
The flag name isn't changing. More comments saying "I want this" aren't helpful. I have questions about how to implement this. What would be helpful is if folks could dive into answering those questions. See my previous comments. |
My view of how the implementation should roughly look:
Note: I have very little understanding of how ripgrep is internally architected, maybe the |
I would also like to vote for such a feature. (Recursively searching through a directory structure that contains archive formats is really painful ATM.) Some additional ideas:
|
Opening this issue as suggested by @BurntSushi in #1111.
I think it would be helpful if ripgrep can support scanning archive files. Scanning tar files can briefly done via
-a
option, but there are downsides:It is unclear how scanning archive files should work. It should definitely be opt-in just like
--search-zip
. We can probably add--search-archive
or--search-tar
for this purpose. I guess ideally archive files should probably be handled like directory rather than single file in that mode.That should lead to some thing like
@BurntSushi what do you think?
The text was updated successfully, but these errors were encountered: