mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2024-12-12 19:18:24 +02:00
5af7707a35
If ripgrep was called in a way where the entire contents of a file aren't read (like --files-with-matches, among other methods), and if the file was read through an external process, then ripgrep would never reap that process. We fix this by introducing an explicit 'close' method, which we now call when using decompression or preprocessor searches. The implementation of 'close' is a little hokey. In particular, when we close stdout, this usually results in a broken pipe, and, consequently, a non-zero code returned once the child process is reaped. This is "situation normal," so we invent a (hopefully portable) heuristic for detecting it. Fixes #1766, Closes #1767 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-MIT | ||
README.md | ||
UNLICENSE |
grep-cli
A utility library that provides common routines desired in search oriented command line applications. This includes, but is not limited to, parsing hex escapes, detecting whether stdin is readable and more. To the extent possible, this crate strives for compatibility across Windows, macOS and Linux.
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-cli = "0.1"
and this to your crate root:
extern crate grep_cli;