summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2023-06-03 10:00:04 -0400
committerDan Davison <dandavison7@gmail.com>2023-06-03 10:00:50 -0400
commit3819e942632580cae47afd1425aca04e37db98cf (patch)
treeeaa65d0e29b84f359655fba31c4b3b2c761543d6
parenta28231aebcf334ac080599aa9d903c734662f0b0 (diff)
Drop grep-header-style option
-rw-r--r--manual/src/full---help-output.md5
-rw-r--r--src/cli.rs6
-rw-r--r--src/options/set.rs1
-rw-r--r--src/parse_styles.rs6
4 files changed, 2 insertions, 16 deletions
diff --git a/manual/src/full---help-output.md b/manual/src/full---help-output.md
index 6145e0bb..5d8dabcb 100644
--- a/manual/src/full---help-output.md
+++ b/manual/src/full---help-output.md
@@ -187,11 +187,6 @@ Options:
See hunk_header_file_style.
- --grep-header-style <STYLE>
- Style string for the header in grep output.
-
- See hunk-header-style.
-
--grep-line-number-style <STYLE>
Style string for line numbers in grep output.
diff --git a/src/cli.rs b/src/cli.rs
index 50dab5a6..e1e47503 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -419,12 +419,6 @@ pub struct Opt {
/// See hunk_header_file_style.
pub grep_header_file_style: Option<String>,
- #[arg(long = "grep-header-style", value_name = "STYLE")]
- /// Style string for the header in grep output.
- ///
- /// See hunk-header-style.
- pub grep_header_style: Option<String>,
-
#[arg(
long = "grep-line-number-style",
default_value = "green",
diff --git a/src/options/set.rs b/src/options/set.rs
index 1703b67b..732806a7 100644
--- a/src/options/set.rs
+++ b/src/options/set.rs
@@ -154,7 +154,6 @@ pub fn set_options(
grep_file_style,
grep_header_decoration_style,
grep_header_file_style,
- grep_header_style,
grep_output_type,
grep_line_number_style,
grep_match_line_style,
diff --git a/src/parse_styles.rs b/src/parse_styles.rs
index 81b8f8df..0cd97f39 100644
--- a/src/parse_styles.rs
+++ b/src/parse_styles.rs
@@ -325,9 +325,7 @@ fn make_commit_file_hunk_header_styles(opt: &cli::Opt, styles: &mut HashMap<&str
(
"classic-grep-header-style",
style_from_str_with_handling_of_special_decoration_attributes(
- opt.grep_header_style
- .as_deref()
- .unwrap_or(opt.hunk_header_style.as_str()),
+ opt.hunk_header_style.as_str(),
None,
opt.grep_header_decoration_style
.as_deref()
@@ -339,7 +337,7 @@ fn make_commit_file_hunk_header_styles(opt: &cli::Opt, styles: &mut HashMap<&str
(
"ripgrep-header-style",
style_from_str_with_handling_of_special_decoration_attributes(
- opt.grep_header_style.as_deref().unwrap_or("file"),
+ "file",
None,
opt.grep_header_decoration_style.as_deref().or(Some("none")),
true_color,