Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or, if your usage is sufficiently infrequent to not need caching and if you'd rather not depend on one more tool, simply configure ripgrep to use a `--pre` flag (which is what rga is doing :).

See config and gist at https://github.com/BurntSushi/ripgrep/issues/1252



Pretty hard to make rg search in files within archives though without actually extracting them (which I've seen more than one request for in the ripgrep issues [1]), which is why rga includes streaming, recursive decompression of archives including running other preprocessors (like pdf) within them (second example in the above post and readme).

[1]: https://github.com/BurntSushi/ripgrep/issues/918


That's a pretty cool feature indeed, I had missed it (and now I understand the need for a separate binary with archive handling & streaming logic). Thanks for correcting.


You might get some inspiration from Strigi, a C++ library and program that also does recursive decompression for searching. It support indexing pdfs, archives, emails without writing temporary files.

https://www.vandenoever.info/software/strigi/akademy2006.pdf

I've considered rewriting Strigi in rust quite often but too many other projects to pursue at the moment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: