Merge branch 'implement-config-subcommand' of github.com:jerus-org/cull-gmail

This commit is contained in:
Jeremiah Russell
2025-10-07 08:01:22 +01:00
committed by Jeremiah Russell
parent c68d34867e
commit 782cfc4baf
3 changed files with 42 additions and 3 deletions

35
src/config_cli.rs Normal file
View File

@@ -0,0 +1,35 @@
use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
pub struct ConfigCli {
/// Configuration commands
#[command(subcommand)]
command: ConfigCommands,
}
impl ConfigCli {
pub fn run(&self) {
match self.command {
ConfigCommands::List => todo!(),
ConfigCommands::Add => todo!(),
ConfigCommands::Remove => todo!(),
ConfigCommands::Update => todo!(),
}
}
}
#[derive(Debug, Subcommand)]
pub enum ConfigCommands {
/// List the rules configured and saved in the config file
#[clap(name = "list")]
List,
/// Add a rules to the config file
#[clap(name = "add")]
Add,
/// Remove a rule from the config file
#[clap(name = "remove", alias = "rm")]
Remove,
/// Update a rule in the config file
#[clap(name = "update")]
Update,
}