mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-01-29 22:01:04 +02:00
4846d63539
This commit moves a lot of "utility" code from ripgrep core into grep-cli. Any one of these things might not be worth creating a new crate, but combining everything together results in a fair number of a convenience routines that make up a decent sized crate. There is potentially more we could move into the crate, but much of what remains in ripgrep core is almost entirely dealing with the number of flags we support. In the course of doing moving things to the grep-cli crate, we clean up a lot of gunk and improve failure modes in a number of cases. In particular, we've fixed a bug where other processes could deadlock if they write too much to stderr. Fixes #990
grep
ripgrep, as a library.
Dual-licensed under MIT or the UNLICENSE.
Documentation
NOTE: This crate isn't ready for wide use yet. Ambitious individuals can probably piece together the parts, but there is no high level documentation describing how all of the pieces fit together.
Usage
Add this to your Cargo.toml
:
[dependencies]
grep = "0.2"
and this to your crate root:
extern crate grep;
Features
This crate provides a pcre2
feature (disabled by default) which, when
enabled, re-exports the grep-pcre2
crate as an alternative Matcher
implementation to the standard grep-regex
implementation.