mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
doc: update ripgrep's description
This now mentions PCRE2 support.
This commit is contained in:
parent
74a89be641
commit
fcd1853031
@ -28,27 +28,37 @@ Synopsis
|
|||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
ripgrep (rg) recursively searches your current directory for a regex pattern.
|
ripgrep (rg) recursively searches your current directory for a regex pattern.
|
||||||
By default, ripgrep will respect your `.gitignore` and automatically skip
|
By default, ripgrep will respect your .gitignore and automatically skip hidden
|
||||||
hidden files/directories and binary files.
|
files/directories and binary files.
|
||||||
|
|
||||||
ripgrep's regex engine uses finite automata and guarantees linear time
|
ripgrep's default regex engine uses finite automata and guarantees linear
|
||||||
searching. Because of this, features like backreferences and arbitrary
|
time searching. Because of this, features like backreferences and arbitrary
|
||||||
lookaround are not supported.
|
look-around are not supported. However, if ripgrep is built with PCRE2, then
|
||||||
|
the --pcre2 flag can be used to enable backreferences and look-around.
|
||||||
|
|
||||||
|
ripgrep supports configuration files. Set RIPGREP_CONFIG_PATH to a
|
||||||
|
configuration file. The file can specify one shell argument per line. Lines
|
||||||
|
starting with '#' are ignored. For more details, see the man page or the
|
||||||
|
README.
|
||||||
|
|
||||||
|
|
||||||
REGEX SYNTAX
|
REGEX SYNTAX
|
||||||
------------
|
------------
|
||||||
ripgrep uses Rust's regex engine, which documents its syntax:
|
ripgrep uses Rust's regex engine by default, which documents its syntax:
|
||||||
https://docs.rs/regex/0.2.5/regex/#syntax
|
https://docs.rs/regex/*/regex/#syntax
|
||||||
|
|
||||||
ripgrep uses byte-oriented regexes, which has some additional documentation:
|
ripgrep uses byte-oriented regexes, which has some additional documentation:
|
||||||
https://docs.rs/regex/0.2.5/regex/bytes/index.html#syntax
|
https://docs.rs/regex/*/regex/bytes/index.html#syntax
|
||||||
|
|
||||||
To a first approximation, ripgrep uses Perl-like regexes without look-around or
|
To a first approximation, ripgrep uses Perl-like regexes without look-around or
|
||||||
backreferences. This makes them very similar to the "extended" (ERE) regular
|
backreferences. This makes them very similar to the "extended" (ERE) regular
|
||||||
expressions supported by `egrep`, but with a few additional features like
|
expressions supported by `egrep`, but with a few additional features like
|
||||||
Unicode character classes.
|
Unicode character classes.
|
||||||
|
|
||||||
|
If you're using ripgrep with the --pcre2 flag, then please consult
|
||||||
|
https://www.pcre.org or the PCRE2 man pages for documentation on the supported
|
||||||
|
syntax.
|
||||||
|
|
||||||
|
|
||||||
POSITIONAL ARGUMENTS
|
POSITIONAL ARGUMENTS
|
||||||
--------------------
|
--------------------
|
||||||
|
11
src/app.rs
11
src/app.rs
@ -13,12 +13,13 @@ use clap::{self, App, AppSettings};
|
|||||||
|
|
||||||
const ABOUT: &str = "
|
const ABOUT: &str = "
|
||||||
ripgrep (rg) recursively searches your current directory for a regex pattern.
|
ripgrep (rg) recursively searches your current directory for a regex pattern.
|
||||||
By default, ripgrep will respect your `.gitignore` and automatically skip
|
By default, ripgrep will respect your .gitignore and automatically skip hidden
|
||||||
hidden files/directories and binary files.
|
files/directories and binary files.
|
||||||
|
|
||||||
ripgrep's regex engine uses finite automata and guarantees linear time
|
ripgrep's default regex engine uses finite automata and guarantees linear
|
||||||
searching. Because of this, features like backreferences and arbitrary
|
time searching. Because of this, features like backreferences and arbitrary
|
||||||
lookaround are not supported.
|
look-around are not supported. However, if ripgrep is built with PCRE2, then
|
||||||
|
the --pcre2 flag can be used to enable backreferences and look-around.
|
||||||
|
|
||||||
ripgrep supports configuration files. Set RIPGREP_CONFIG_PATH to a
|
ripgrep supports configuration files. Set RIPGREP_CONFIG_PATH to a
|
||||||
configuration file. The file can specify one shell argument per line. Lines
|
configuration file. The file can specify one shell argument per line. Lines
|
||||||
|
Loading…
x
Reference in New Issue
Block a user