diff options
author | Andrew Gallant <jamslam@gmail.com> | 2018-08-21 21:24:02 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-08-21 23:05:52 -0400 |
commit | fcd185303198f9a6c8026e0a632c84bacf36e779 (patch) | |
tree | 30ad38e1468ff34cc4c82cb55d44748f302622e1 | |
parent | 74a89be64110a61972169c4a7f0e44ea2a43b4ec (diff) |
doc: update ripgrep's description
This now mentions PCRE2 support.
-rw-r--r-- | doc/rg.1.txt.tpl | 26 | ||||
-rw-r--r-- | src/app.rs | 11 |
2 files changed, 24 insertions, 13 deletions
diff --git a/doc/rg.1.txt.tpl b/doc/rg.1.txt.tpl index ab1ef78f..558aadc3 100644 --- a/doc/rg.1.txt.tpl +++ b/doc/rg.1.txt.tpl @@ -28,27 +28,37 @@ Synopsis DESCRIPTION ----------- ripgrep (rg) recursively searches your current directory for a regex pattern. -By default, ripgrep will respect your `.gitignore` and automatically skip -hidden files/directories and binary files. +By default, ripgrep will respect your .gitignore and automatically skip hidden +files/directories and binary files. -ripgrep's regex engine uses finite automata and guarantees linear time -searching. Because of this, features like backreferences and arbitrary -lookaround are not supported. +ripgrep's default regex engine uses finite automata and guarantees linear +time searching. Because of this, features like backreferences and arbitrary +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 ------------ -ripgrep uses Rust's regex engine, which documents its syntax: -https://docs.rs/regex/0.2.5/regex/#syntax +ripgrep uses Rust's regex engine by default, which documents its syntax: +https://docs.rs/regex/*/regex/#syntax 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 backreferences. This makes them very similar to the "extended" (ERE) regular expressions supported by `egrep`, but with a few additional features like 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 -------------------- @@ -13,12 +13,13 @@ use clap::{self, App, AppSettings}; const ABOUT: &str = " ripgrep (rg) recursively searches your current directory for a regex pattern. -By default, ripgrep will respect your `.gitignore` and automatically skip -hidden files/directories and binary files. +By default, ripgrep will respect your .gitignore and automatically skip hidden +files/directories and binary files. -ripgrep's regex engine uses finite automata and guarantees linear time -searching. Because of this, features like backreferences and arbitrary -lookaround are not supported. +ripgrep's default regex engine uses finite automata and guarantees linear +time searching. Because of this, features like backreferences and arbitrary +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 |