summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBalaji Sivaraman <balaji@balajisivaraman.com>2018-01-07 21:35:58 +0530
committerAndrew Gallant <jamslam@gmail.com>2018-01-30 09:13:53 -0500
commitf007f940c53a4818ead58f2fe2e0fac95cc3a40a (patch)
tree4612a86e94ffc22f44c9851925fdf01f18b920ad /doc
parenta8543f798d5cd0ccfb038c2b80a640f02521c370 (diff)
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
Diffstat (limited to 'doc')
-rw-r--r--doc/rg.113
-rw-r--r--doc/rg.1.md7
2 files changed, 17 insertions, 3 deletions
diff --git a/doc/rg.1 b/doc/rg.1
index d8272e74..fd562e81 100644
--- a/doc/rg.1
+++ b/doc/rg.1
@@ -184,6 +184,15 @@ Only show matches surrounded by line boundaries.
This is equivalent to putting ^...$ around the search pattern.
.RS
.RE
+.TP
+.B \-z, \-\-search\-zip
+Search in compressed files.
+Currently gz, bz2, xz and lzma formats are supported.
+.RS
+.PP
+Note that ripgrep expects to find the decompression binaries for the
+respective formats in your system\[aq]s PATH for use with this flag.
+.RE
.SH LESS COMMON OPTIONS
.TP
.B \-A, \-\-after\-context \f[I]NUM\f[]
@@ -437,9 +446,7 @@ such part on a separate output line.
.TP
.B \-\-passthru, \-\-passthrough
Show both matching and non\-matching lines.
-This is equivalent to adding ^ to the list of search patterns.
-This option overrides \-\-count and cannot be used with
-\-\-only\-matching or \-\-replace.
+This option cannot be used with \-\-only\-matching or \-\-replace.
.RS
.RE
.TP
diff --git a/doc/rg.1.md b/doc/rg.1.md
index 93b401ab..6b054286 100644
--- a/doc/rg.1.md
+++ b/doc/rg.1.md
@@ -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*