Skip to content
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

search: add support for searching compressed files #767

Merged
merged 1 commit into from
Jan 30, 2018
Merged

Conversation

BurntSushi
Copy link
Owner

This commit adds opt-in support for searching compressed files during
recursive search. This behavior is only enabled when the
-z/--search-zip flag is passed to ripgrep. When enabled, a limited set
of common compression formats are recognized via file extension, and a
new process is spawned to perform the decompression. ripgrep then
searches the stdout of that spawned process.

Closes #539


This PR is based on work in #751. Most of that PR was kept unchanged, with one exception: we need to more carefully manage the subprocess. I will leave comments on #751 explaining it.

@BurntSushi BurntSushi force-pushed the ag/compressed branch 2 times, most recently from 9dfed21 to fed13c8 Compare January 30, 2018 03:08
This commit adds opt-in support for searching compressed files during
recursive search. This behavior is only enabled when the
`-z/--search-zip` flag is passed to ripgrep. When enabled, a limited set
of common compression formats are recognized via file extension, and a
new process is spawned to perform the decompression. ripgrep then
searches the stdout of that spawned process.

Closes #539
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants