From 0bca3ed6f9b7e432e2eb79701fe0381193b34d13 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Wed, 8 Oct 2025 12:03:05 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(rules=5Fcli):=20add=20option?= =?UTF-8?q?=20to=20immediately=20delete=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add `delete` flag to `add` command - allow immediate deletion of rules instead of moving to trash --- src/rules_cli/add_cli.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rules_cli/add_cli.rs b/src/rules_cli/add_cli.rs index 3cb9144..8f56969 100644 --- a/src/rules_cli/add_cli.rs +++ b/src/rules_cli/add_cli.rs @@ -33,6 +33,9 @@ pub struct AddCli { /// Optional specific label; if not specified one will be generated #[arg(short, long)] label: Option, + /// Immediate delete instead of move to trash + #[arg(long)] + delete: bool, } impl AddCli { @@ -41,7 +44,7 @@ impl AddCli { let message_age = MessageAge::new(self.period.to_string().as_str(), self.count); let retention = Retention::new(message_age, generate); - config.add_rule(retention, self.label.as_ref()); + config.add_rule(retention, self.label.as_ref(), self.delete); config.save() } }