From 0eb1534e42f13c5966e7406a78d2f7aa0b292499 Mon Sep 17 00:00:00 2001 From: crapStone Date: Sat, 16 Jul 2022 01:17:20 +0200 Subject: [PATCH] use long names --- src/cli.rs | 6 +++--- src/main.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index d5c97b8..ca49ce5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -42,20 +42,20 @@ pub fn build_cli() -> App<'static> { .help("Prints current brightness value"), ) .arg( - Arg::with_name("zer") + Arg::with_name("zero") .short('z') .long("zero") .help("Sets brightness to lowest value"), ) .arg( - Arg::with_name("ful") + Arg::with_name("full") .short('f') .long("full") .help("Sets brightness to highest value"), ) .group( ArgGroup::with_name("brightness_control") - .args(&["set", "inc", "dec", "get", "zer", "ful"]), + .args(&["set", "inc", "dec", "get", "zero", "full"]), ) .arg( Arg::with_name("list") diff --git a/src/main.rs b/src/main.rs index 0a5613b..2653096 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,9 +42,9 @@ fn main() { controller.set_brightness(new_value.max(0)); } else if matches.is_present("get") { println!("{}", controller.get_brightness()); - } else if matches.is_present("zer") { + } else if matches.is_present("zero") { controller.set_brightness(0); - } else if matches.is_present("ful") { + } else if matches.is_present("full") { controller.set_brightness(controller.get_max_brightness()); } else { build_cli().print_long_help().unwrap();