From 2035dc7a8507d6c31ebd5c1071c3721f24b4e74b Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Mon, 6 Oct 2025 09:54:12 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(cli):=20add=20trash=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Implement a new subcommand `trash` to move emails to trash. - Introduce `trash_cli.rs` to handle the logic for selecting emails to move to trash. --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index ebda9c3..81c6bec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,12 +2,15 @@ use clap::{Parser, Subcommand}; mod label_cli; mod message_cli; +mod trash_cli; use cull_gmail::Error; use label_cli::LabelCli; use message_cli::MessageCli; use std::error::Error as stdError; +use trash_cli::TrashCli; + #[derive(Parser, Debug)] #[clap(author, version, about, long_about = None)] struct Cli { @@ -25,6 +28,9 @@ enum Commands { /// List labels #[clap(name = "label")] Labels(LabelCli), + /// List trash + #[clap(name = "trash")] + Trash(TrashCli), } #[tokio::main] @@ -55,6 +61,7 @@ async fn run(args: Cli) -> Result<(), Error> { match cmds { Commands::Message(list_cli) => list_cli.run("credential.json").await?, Commands::Labels(label_cli) => label_cli.run("credential.json").await?, + Commands::Trash(trash_cli) => trash_cli.run("credential.json").await?, } } Ok(())