summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2019-04-15 06:51:51 -0400
committerAndrew Gallant <jamslam@gmail.com>2019-04-15 06:51:51 -0400
commitef1611b5f5877a111b8f09fc2bd4cb0438347a5a (patch)
treec8c327ffc9fff7be4ded4ccc3f16e5a0421f7459 /src
parent45d12abbc5f576d3b10ae13dc7410b14400a8d1e (diff)
ripgrep: max-column-preview --> max-columns-preview
Credit to @okdana for catching this. This naming is a bit more consistent with the existing --max-columns flag.
Diffstat (limited to 'src')
-rw-r--r--src/app.rs14
-rw-r--r--src/args.rs6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/app.rs b/src/app.rs
index 7ec54118..a4f0aa58 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -583,7 +583,7 @@ pub fn all_args_and_flags() -> Vec<RGArg> {
flag_line_number(&mut args);
flag_line_regexp(&mut args);
flag_max_columns(&mut args);
- flag_max_column_preview(&mut args);
+ flag_max_columns_preview(&mut args);
flag_max_count(&mut args);
flag_max_depth(&mut args);
flag_max_filesize(&mut args);
@@ -1490,7 +1490,7 @@ When this flag is omitted or is set to 0, then it has no effect.
args.push(arg);
}
-fn flag_max_column_preview(args: &mut Vec<RGArg>) {
+fn flag_max_columns_preview(args: &mut Vec<RGArg>) {
const SHORT: &str = "Print a preview for lines exceeding the limit.";
const LONG: &str = long!("\
When the '--max-columns' flag is used, ripgrep will by default completely
@@ -1501,16 +1501,16 @@ of the line exceeding the limit is not shown.
If the '--max-columns' flag is not set, then this has no effect.
-This flag can be disabled with '--no-max-column-preview'.
+This flag can be disabled with '--no-max-columns-preview'.
");
- let arg = RGArg::switch("max-column-preview")
+ let arg = RGArg::switch("max-columns-preview")
.help(SHORT).long_help(LONG)
- .overrides("no-max-column-preview");
+ .overrides("no-max-columns-preview");
args.push(arg);
- let arg = RGArg::switch("no-max-column-preview")
+ let arg = RGArg::switch("no-max-columns-preview")
.hidden()
- .overrides("max-column-preview");
+ .overrides("max-columns-preview");
args.push(arg);
}
diff --git a/src/args.rs b/src/args.rs
index 80693da8..cd217b4b 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -778,7 +778,7 @@ impl ArgMatches {
.per_match(self.is_present("vimgrep"))
.replacement(self.replacement())
.max_columns(self.max_columns()?)
- .max_column_preview(self.max_column_preview())
+ .max_columns_preview(self.max_columns_preview())
.max_matches(self.max_count()?)
.column(self.column())
.byte_offset(self.is_present("byte-offset"))
@@ -1177,8 +1177,8 @@ impl ArgMatches {
/// Returns true if and only if a preview should be shown for lines that
/// exceed the maximum column limit.
- fn max_column_preview(&self) -> bool {
- self.is_present("max-column-preview")
+ fn max_columns_preview(&self) -> bool {
+ self.is_present("max-columns-preview")
}
/// The maximum number of matches permitted.