From 0cffeae15bc31f9af13bd447a6230b80b81de264 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 7 Jan 2021 04:58:53 -0500 Subject: Fix --help output for hunk-header-style --- README.md | 13 ++++++++++--- src/cli.rs | 6 ++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3873659d..dfd1191f 100644 --- a/README.md +++ b/README.md @@ -700,9 +700,16 @@ OPTIONS: --hunk-header-style Style (foreground, background, attributes) for the hunk-header. See STYLES section. Special attributes 'file' and 'line-number' can be used to include the file path, and number of first hunk line, in the hunk - header. If included in the hunk header, 'file' and 'line-number' are styled according to 'file-style' and - 'hunk-header-decoration-style' respectively. The style 'omit' can be used to remove the hunk header section - from the output [default: line-number syntax] + header. The style 'omit' can be used to remove the hunk header section from the output [default: line- + number syntax] + --hunk-header-file-style + Style (foreground, background, attributes) for the file path part of the hunk-header. See STYLES section. + The file path will only be displayed if hunk-header-style contains the 'file' special attribute [default: + blue] + --hunk-header-line-number-style + Style (foreground, background, attributes) for the line number part of the hunk-header. See STYLES section. + The line number will only be displayed if hunk-header-style contains the 'line-number' special attribute + [default: blue] --hunk-header-decoration-style Style (foreground, background, attributes) for the hunk-header decoration. See STYLES section. The style string should contain one of the special attributes 'box', 'ul' (underline), 'ol' (overline), or the diff --git a/src/cli.rs b/src/cli.rs index ee3baace..743b72f3 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -366,10 +366,8 @@ pub struct Opt { #[structopt(long = "hunk-header-style", default_value = "line-number syntax")] /// Style (foreground, background, attributes) for the hunk-header. See STYLES section. Special /// attributes 'file' and 'line-number' can be used to include the file path, and number of - /// first hunk line, in the hunk header. If included in the hunk header, 'file' and - /// 'line-number' are styled according to 'file-style' and 'hunk-header-decoration-style' - /// respectively. The style 'omit' can be used to remove the hunk header section from the - /// output. + /// first hunk line, in the hunk header. The style 'omit' can be used to remove the hunk header + /// section from the output. pub hunk_header_style: String, #[structopt(long = "hunk-header-file-style", default_value = "blue")] -- cgit v1.2.3