diff options
author | Andrew Schwartzmeyer <andrew@schwartzmeyer.com> | 2016-09-23 19:06:34 -0700 |
---|---|---|
committer | Andrew Schwartzmeyer <andrew@schwartzmeyer.com> | 2016-09-24 21:40:17 -0700 |
commit | a8f3d9e87e7e9192a9c1815da7c07d4522ccc1b2 (patch) | |
tree | 27dc814fa92f1f56359dfe75b281cc42fff2f376 /doc | |
parent | 1595f0faf594be5d303b1783857d23a0fda74230 (diff) |
Add --files-with-matches flag.
Closes #26.
Acts like --count but emits only the paths of files with matches,
suitable for piping to xargs. Both mmap and no-mmap searches terminate
after the first match is found. Documentation updated and tests added.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/rg.1 | 5 | ||||
-rw-r--r-- | doc/rg.1.md | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -35,6 +35,11 @@ Only show count of line matches for each file. .RS .RE .TP +.B \-l, \-\-files\-with\-matches +Only show path of each file with matches. +.RS +.RE +.TP .B \-\-color \f[I]WHEN\f[] Whether to use coloring in match. Valid values are never, always or auto. diff --git a/doc/rg.1.md b/doc/rg.1.md index b9f68968..d50e7f27 100644 --- a/doc/rg.1.md +++ b/doc/rg.1.md @@ -29,6 +29,9 @@ the raw speed of grep. -c, --count : Only show count of line matches for each file. +-l, --files-with-matches +: Only show path of each file with matches. + --color *WHEN* : Whether to use coloring in match. Valid values are never, always or auto. [default: auto] |