From 7bac6d97cf9e2d62d999742a311352805062744e Mon Sep 17 00:00:00 2001 From: Sean Young Date: Fri, 31 May 2024 20:16:02 +0100 Subject: [PATCH] Fix cir keymap Signed-off-by: Sean Young --- cir/src/bin/cir.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/cir/src/bin/cir.rs b/cir/src/bin/cir.rs index 9a8d418..7388226 100644 --- a/cir/src/bin/cir.rs +++ b/cir/src/bin/cir.rs @@ -223,7 +223,6 @@ fn parse_scancode(arg: &str) -> Result<(String, u64), String> { #[cfg(target_os = "linux")] #[derive(Args)] struct Keymap { - #[cfg(target_os = "linux")] #[clap(flatten)] device: RcDevice, @@ -525,15 +524,12 @@ impl Subcommand for Commands { .subcommand(List::augment_args( Command::new("list").about("List IR and CEC devices"), )) - .subcommand_required(true) - .subcommand(List::augment_args( + .subcommand(Keymap::augment_args( Command::new("keymap").about("Configure IR and CEC devices"), )) - .subcommand_required(true) - .subcommand(List::augment_args( + .subcommand(Test::augment_args( Command::new("test").about("Receive IR and print to stdout"), - )) - .subcommand_required(true); + )); cmd } @@ -553,15 +549,12 @@ impl Subcommand for Commands { .subcommand(List::augment_args( Command::new("list").about("List IR and CEC devices"), )) - .subcommand_required(true) .subcommand(List::augment_args( Command::new("keymap").about("Configure IR and CEC devices"), )) - .subcommand_required(true) .subcommand(List::augment_args( Command::new("test").about("Receive IR and print to stdout"), - )) - .subcommand_required(true); + )); cmd }