mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-24 08:33:48 -07:00
Use uppercase for required argument names
This reverts a couple of changes introduced in 4c78ca8
and keeps the
`PATTERN` argument consistently uppercased, so error messages can look
like:
error: The following required arguments were not provided:
<PATTERN>
This commit is contained in:
committed by
Andrew Gallant
parent
2628c8f38e
commit
13235b596f
@@ -375,7 +375,7 @@ impl<'a> ArgMatches<'a> {
|
||||
if self.is_present("file")
|
||||
|| self.is_present("files")
|
||||
|| self.is_present("regexp") {
|
||||
if let Some(path) = self.value_of_os("pattern") {
|
||||
if let Some(path) = self.value_of_os("PATTERN") {
|
||||
paths.insert(0, Path::new(path).to_path_buf());
|
||||
}
|
||||
}
|
||||
@@ -438,7 +438,7 @@ impl<'a> ArgMatches<'a> {
|
||||
match self.values_of_os("regexp") {
|
||||
None => {
|
||||
if self.values_of_os("file").is_none() {
|
||||
if let Some(os_pat) = self.value_of_os("pattern") {
|
||||
if let Some(os_pat) = self.value_of_os("PATTERN") {
|
||||
pats.push(try!(self.os_str_pattern(os_pat)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user