From 0fa5a214348b38b354b11eda68ca9f9def72fe64 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Fri, 3 Oct 2025 17:37:16 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(cli):=20add=20label=20listing?= =?UTF-8?q?=20subcommand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - implement new `label` subcommand to list available Gmail labels - create `label_cli` module to handle label listing logic - integrate label listing into the main CLI application --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index 98c4567..40a8f3f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,10 @@ use clap::{Parser, Subcommand}; +mod label_cli; mod list_cli; use cull_gmail::Error; +use label_cli::LabelCli; use list_cli::ListCli; use std::error::Error as stdError; @@ -20,6 +22,9 @@ enum Commands { /// List messages #[clap(name = "list")] List(ListCli), + /// List labels + #[clap(name = "label")] + Labels(LabelCli), } #[tokio::main] @@ -49,6 +54,7 @@ async fn run(args: Cli) -> Result<(), Error> { if let Some(cmds) = args.command { match cmds { Commands::List(list_cli) => list_cli.run("credential.json").await?, + Commands::Labels(label_cli) => label_cli.run("credential.json").await?, } } Ok(())