From b7fcc66fa5016b4d3b4fe46cbdb62b97a9b6e90f Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Thu, 17 Apr 2025 18:31:24 -0400 Subject: [PATCH] add conflicts for options with interactive --- harmony_cli/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/harmony_cli/src/lib.rs b/harmony_cli/src/lib.rs index 4d0f04c..e1e7dfb 100644 --- a/harmony_cli/src/lib.rs +++ b/harmony_cli/src/lib.rs @@ -11,11 +11,11 @@ use harmony_tui; #[command(version, about, long_about = None)] pub struct Args { /// Run score(s) without prompt - #[arg(short, long, default_value_t = false)] + #[arg(short, long, default_value_t = false, conflicts_with = "interactive")] yes: bool, /// Filter query - #[arg(short, long)] + #[arg(short, long, conflicts_with = "interactive")] filter: Option, /// Run interactive TUI or not @@ -29,16 +29,17 @@ pub struct Args { default_value_t = true, default_value_if("number", ArgPredicate::IsPresent, "false"), conflicts_with = "number", + conflicts_with = "interactive", conflicts_with = "list" )] all: bool, /// Run nth matching, zero indexed - #[arg(short, long, default_value_t = 0)] + #[arg(short, long, default_value_t = 0, conflicts_with = "interactive")] number: usize, /// list scores, will also be affected by run filter - #[arg(short, long, default_value_t = false)] + #[arg(short, long, default_value_t = false, conflicts_with = "interactive")] list: bool, }