Skip to content

Commit

Permalink
Update PATTERN/PATH descriptions in usage help
Browse files Browse the repository at this point in the history
Fixes BurntSushi#725 (sort of)

* Capitalise place-holder names consistently
* Add note about PATH overriding glob/ignore rules
  • Loading branch information
okdana committed Jan 1, 2018
1 parent 5db438f commit f01a4cb
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ 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 ...]
rg [options] [-e PATTERN ...] [-f FILE ...] [path ...]
rg [options] --files [path ...]
rg [options] --type-list";
rg [OPTIONS] PATTERN [PATH ...]
rg [OPTIONS] [-e PATTERN ...] [-f FILE ...] [PATH ...]
rg [OPTIONS] --files [PATH ...]
rg [OPTIONS] --type-list";

const TEMPLATE: &str = "\
{bin} {version}
Expand Down Expand Up @@ -67,7 +67,7 @@ pub fn app() -> App<'static, 'static> {
"file", "files", "help-short", "help", "regexp", "type-list",
"ripgrep-version",
]))
.arg(arg("path").multiple(true))
.arg(arg("PATH").multiple(true))
.arg(flag("regexp").short("e")
.takes_value(true).multiple(true).number_of_values(1)
.set(ArgSettings::AllowLeadingHyphen)
Expand Down Expand Up @@ -247,10 +247,11 @@ lazy_static! {
"Use pattern to search. This option can be provided multiple \
times, where all patterns given are searched. This is also \
useful when searching for patterns that start with a dash.");
doc!(h, "path",
doc!(h, "PATH",
"A file or directory to search.",
"A file or directory to search. Directories are searched \
recursively.");
recursively. Paths specified on the command line override glob \
and ignore rules.");
doc!(h, "files",
"Print each file that would be searched.",
"Print each file that would be searched without actually \
Expand Down

0 comments on commit f01a4cb

Please sign in to comment.