mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2024-12-12 19:18:24 +02:00
a7f2d48234
This commit fixes a bug where both of the following commands always reported an error: rg --files-with-matches foo file rg --files-without-match foo file In particular, the printer was erroneously respecting the `path` option even the the summary kind was `PathWithMatch` or `PathWithoutMatch`. The documented behavior is that those summary kinds always require a path, and thus, the `path` option has no effect. We fix this by correcting the case analysis. This also fixes a bug where the exit code for `--files-without-match` was not set correctly. We update the printer's `has_match` method to report the correct value. Fixes #1106, Closes #1130 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-MIT | ||
README.md | ||
UNLICENSE |
grep-printer
Print results from line oriented searching in a human readable, aggregate or JSON Lines format.
Dual-licensed under MIT or the UNLICENSE.
Documentation
NOTE: You probably don't want to use this crate directly. Instead, you
should prefer the facade defined in the
grep
crate.
Usage
Add this to your Cargo.toml
:
[dependencies]
grep-printer = "0.1"
and this to your crate root:
extern crate grep_printer;