Skip to content

Commit

Permalink
Drop grep-header-style option
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Jun 3, 2023
1 parent a28231a commit 3819e94
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
5 changes: 0 additions & 5 deletions manual/src/full---help-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 0 additions & 6 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/options/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions src/parse_styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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,
Expand Down

0 comments on commit 3819e94

Please sign in to comment.