printer: add --passthru flag
The --passthru flag causes ripgrep to print every line, even if the line does not contain a match. This is a response to the common pattern of `^|foo` to match every line, while still highlighting things like `foo`. Fixes #740
This commit is contained in:
8
doc/rg.1
8
doc/rg.1
@@ -435,6 +435,14 @@ such part on a separate output line.
|
||||
.RS
|
||||
.RE
|
||||
.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.
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \-\-path\-separator \f[I]SEPARATOR\f[]
|
||||
The path separator to use when printing file paths.
|
||||
This defaults to your platform\[aq]s path separator, which is / on Unix
|
||||
|
||||
@@ -288,6 +288,10 @@ Project home page: https://github.com/BurntSushi/ripgrep
|
||||
: Print only the matched (non-empty) parts of a matching line, with each such
|
||||
part on a separate output line.
|
||||
|
||||
--passthru, --passthrough
|
||||
: Show both matching and non-matching lines. This option cannot be used with
|
||||
--only-matching or --replace.
|
||||
|
||||
--path-separator *SEPARATOR*
|
||||
: The path separator to use when printing file paths. This defaults to your
|
||||
platform's path separator, which is / on Unix and \\ on Windows. This flag is
|
||||
|
||||
Reference in New Issue
Block a user