From 1d19643af2d5efa0b5c5c5735233083e7e6bd6ca Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 25 Jun 2020 11:02:03 -0400 Subject: Make number-zero-style non-Option --- src/cli.rs | 4 ++-- src/config.rs | 24 +++++++++++------------- src/features/numbers.rs | 13 ++++++------- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 5136f6cb..6ec520a9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -338,8 +338,8 @@ pub struct Opt { /// Style (foreground, background, attributes) to apply on unchanged lines (if --number is set), /// overriding --number-minus-style and --number-plus-style. See STYLES section. - #[structopt(long = "number-zero-style")] - pub number_zero_style: Option, + #[structopt(long = "number-zero-style", default_value = "auto")] + pub number_zero_style: String, /// Format string for the left column of line numbers. A typical value would be "{nm:^4}⋮" /// which means to display the line numbers of the minus file (old version), followed by a diff --git a/src/config.rs b/src/config.rs index e7b6b868..32c01837 100644 --- a/src/config.rs +++ b/src/config.rs @@ -54,7 +54,7 @@ pub struct Config { pub number_plus_style: Style, pub number_right_format: String, pub number_right_format_style: Style, - pub number_zero_style: Option