From 724f444133a4b312e6cca7a987ceba738a5f1ca2 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Fri, 31 Oct 2025 16:05:24 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(rules=5Fcli):=20enhance=20?= =?UTF-8?q?CLI=20command=20structure=20with=20clap=20attributes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add clap attributes for better command organization - improve subcommand naming and aliases for usability - attributes disabled as dependent on future clap feature --- src/cli/rules_cli/config_cli.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/cli/rules_cli/config_cli.rs b/src/cli/rules_cli/config_cli.rs index 2cad7f3..8b4a197 100644 --- a/src/cli/rules_cli/config_cli.rs +++ b/src/cli/rules_cli/config_cli.rs @@ -16,31 +16,44 @@ use remove_label_cli::RemoveLabelCli; #[derive(Subcommand, Debug)] enum SubCmds { /// List the rules configured and saved in the config file + // #[clap(name = "list-rules", subcommand_help_heading = "Rules")] #[clap(name = "list-rules")] ListRules, /// Add a rules to the config file + // #[clap(name = "add-rule", subcommand_help_heading = "Rules")] #[clap(name = "add-rule")] AddRule(add_rule_cli::AddRuleCli), /// Remove a rule from the config file + // #[clap( + // name = "remove-rule", + // alias = "rm-rule", + // subcommand_help_heading = "Rules" + // )] #[clap(name = "remove-rule", alias = "rm-rule")] RemoveRule(rm_rule_cli::RmRuleCli), + // #[clap(name = "set-action-on-rule", subcommand_help_heading = "Rules")] #[clap(name = "set-action-on-rule")] ActionRule(ActionRuleCli), /// List the labels associated with a rule + // #[clap(name = "list-labels", subcommand_help_heading = "Label")] #[clap(name = "list-labels")] List(ListLabelCli), /// Add label to rule + // #[clap(name = "add-label", subcommand_help_heading = "Label")] #[clap(name = "add-label")] Add(AddLabelCli), /// Remove a label from a + // #[clap( + // name = "remove-label", + // alias = "rm-label", + // subcommand_help_heading = "Label" + // )] #[clap(name = "remove-label", alias = "rm-label")] Remove(RemoveLabelCli), } #[derive(Parser, Debug)] pub struct ConfigCli { - #[clap(flatten)] - logging: clap_verbosity_flag::Verbosity, #[command(subcommand)] sub_command: SubCmds, }