From cca2c470a5a9bcd6770c72647038ccf490af14c0 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Wed, 16 Oct 2019 21:48:16 -0700 Subject: Rename CLI option: --show-background-colors See #31 --- src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 1ed36e5e..7f4ff061 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,8 +52,8 @@ fn main() -> std::io::Result<()> { let config = cli::process_command_line_arguments(&assets, &opt); - if opt.show_colors { - show_colors(&config); + if opt.show_background_colors { + show_background_colors(&config); process::exit(0); } @@ -75,15 +75,13 @@ fn main() -> std::io::Result<()> { Ok(()) } -fn show_colors(config: &config::Config) { +fn show_background_colors(config: &config::Config) { println!( "delta \ - --theme=\"{theme}\" \ --minus-color=\"{minus_color}\" \ --minus-emph-color=\"{minus_emph_color}\" \ --plus-color=\"{plus_color}\" \ --plus-emph-color=\"{plus_emph_color}\"", - theme = config.theme_name, minus_color = color_to_hex(config.minus_style_modifier.background.unwrap()), minus_emph_color = color_to_hex(config.minus_emph_style_modifier.background.unwrap()), plus_color = color_to_hex(config.plus_style_modifier.background.unwrap()), -- cgit v1.2.3