search: add support for searching compressed files
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 commit is contained in:
committed by
Andrew Gallant
parent
a8543f798d
commit
f007f940c5
@@ -125,6 +125,13 @@ Project home page: https://github.com/BurntSushi/ripgrep
|
||||
: Only show matches surrounded by line boundaries. This is equivalent to
|
||||
putting ^...$ around the search pattern.
|
||||
|
||||
-z, --search-zip
|
||||
: Search in compressed files. Currently gz, bz2, xz and lzma
|
||||
formats are supported.
|
||||
|
||||
Note that ripgrep expects to find the decompression binaries for the
|
||||
respective formats in your system's PATH for use with this flag.
|
||||
|
||||
# LESS COMMON OPTIONS
|
||||
|
||||
-A, --after-context *NUM*
|
||||
|
||||
Reference in New Issue
Block a user