From 6b4f0bf21493fefffbf60d89b3bd95ea60e41602 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Thu, 9 Oct 2025 14:02:18 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(cli):=20add=20action=20subcomm?= =?UTF-8?q?and?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - implement action subcommand to set actions on rules - create action_cli module to handle action-related commands --- src/config_cli.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config_cli.rs b/src/config_cli.rs index 12d4640..d56a78c 100644 --- a/src/config_cli.rs +++ b/src/config_cli.rs @@ -1,8 +1,10 @@ use clap::{Parser, Subcommand}; +mod action_cli; mod label_cli; mod rules_cli; +use action_cli::ActionCli; use cull_gmail::{Config, Result}; use label_cli::LabelCli; use rules_cli::RulesCli; @@ -12,9 +14,12 @@ enum Commands { /// Configure end-of-life rules #[clap(name = "rules")] Rules(RulesCli), - /// Add ore remove Label from rule + /// Add or remove Label from rule #[clap(name = "label")] Label(LabelCli), + /// Set action on a specific rule + #[clap(name = "action")] + Action(ActionCli), } #[derive(Parser, Debug)] @@ -30,6 +35,7 @@ impl ConfigCli { match &self.command { Commands::Rules(rules_cli) => rules_cli.run(config), Commands::Label(label_cli) => label_cli.run(config), + Commands::Action(action_cli) => action_cli.run(config), } } }