Skip to content

Commit 28f2a93

Browse files
committed
doc: shorten -h/--help prelude
It has grown quite long. It would be nice if we could shorten this only when -h is used and keep it long for --help, but it seems clap doesn't let this happen. (It does have `about` and `long_about` options, but they don't work, even when I disable the use of the template.) The longer prelude is now only available in the man page. This addresses #189.
1 parent 0eb2501 commit 28f2a93

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

crates/core/app.rs

+2-19
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,10 @@ ripgrep (rg) recursively searches your current directory for a regex pattern.
1717
By default, ripgrep will respect your .gitignore and automatically skip hidden
1818
files/directories and binary files.
1919
20-
ripgrep's default regex engine uses finite automata and guarantees linear
21-
time searching. Because of this, features like backreferences and arbitrary
22-
look-around are not supported. However, if ripgrep is built with PCRE2, then
23-
the --pcre2 flag can be used to enable backreferences and look-around.
24-
25-
ripgrep supports configuration files. Set RIPGREP_CONFIG_PATH to a
26-
configuration file. The file can specify one shell argument per line. Lines
27-
starting with '#' are ignored. For more details, see the man page or the
28-
README.
29-
30-
ripgrep will automatically detect if stdin exists and search stdin for a regex
31-
pattern, e.g. 'ls | rg foo'. In some environments, stdin may exist when it
32-
shouldn't. To turn off stdin detection explicitly specify the directory to
33-
search, e.g. 'rg foo ./'.
34-
35-
Tip: to disable all smart filtering and make ripgrep behave a bit more like
36-
classical grep, use 'rg -uuu'.
20+
Use -h for short descriptions and --help for more details.
3721
3822
Project home page: https://github.com/BurntSushi/ripgrep
39-
40-
Use -h for short descriptions and --help for more details.";
23+
";
4124

4225
const USAGE: &str = "
4326
rg [OPTIONS] PATTERN [PATH ...]

0 commit comments

Comments
 (0)