mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-22 07:33:47 -07:00
committed by
Andrew Gallant
parent
5e73075ef5
commit
ba1023e1e4
@@ -54,6 +54,7 @@ pub struct Args {
|
||||
invert_match: bool,
|
||||
line_number: bool,
|
||||
line_per_match: bool,
|
||||
line_number_width: Option<usize>,
|
||||
max_columns: Option<usize>,
|
||||
max_count: Option<u64>,
|
||||
max_filesize: Option<u64>,
|
||||
@@ -144,7 +145,8 @@ impl Args {
|
||||
.only_matching(self.only_matching)
|
||||
.path_separator(self.path_separator)
|
||||
.with_filename(self.with_filename)
|
||||
.max_columns(self.max_columns);
|
||||
.max_columns(self.max_columns)
|
||||
.line_number_width(self.line_number_width);
|
||||
if let Some(ref rep) = self.replace {
|
||||
p = p.replace(rep.clone());
|
||||
}
|
||||
@@ -336,6 +338,7 @@ impl<'a> ArgMatches<'a> {
|
||||
ignore_files: self.ignore_files(),
|
||||
invert_match: self.is_present("invert-match"),
|
||||
line_number: line_number,
|
||||
line_number_width: try!(self.usize_of("line-number-width")),
|
||||
line_per_match: self.is_present("vimgrep"),
|
||||
max_columns: try!(self.usize_of("max-columns")),
|
||||
max_count: try!(self.usize_of("max-count")).map(|max| max as u64),
|
||||
|
Reference in New Issue
Block a user