Skip to content

Commit

Permalink
doc: shorten -h/--help prelude
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BurntSushi committed May 9, 2020
1 parent 0eb2501 commit 28f2a93
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions crates/core/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,10 @@ 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.
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.
ripgrep will automatically detect if stdin exists and search stdin for a regex
pattern, e.g. 'ls | rg foo'. In some environments, stdin may exist when it
shouldn't. To turn off stdin detection explicitly specify the directory to
search, e.g. 'rg foo ./'.
Tip: to disable all smart filtering and make ripgrep behave a bit more like
classical grep, use 'rg -uuu'.
Use -h for short descriptions and --help for more details.
Project home page: https://github.com/BurntSushi/ripgrep
Use -h for short descriptions and --help for more details.";
";

const USAGE: &str = "
rg [OPTIONS] PATTERN [PATH ...]
Expand Down

0 comments on commit 28f2a93

Please sign in to comment.