From 8441abd29aea53719c19f34ec6d542a4575a23c9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 11 Feb 2026 00:15:14 +0900 Subject: define subcommands and options --- src/commands/repository.rs | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/commands/repository.rs (limited to 'src/commands/repository.rs') diff --git a/src/commands/repository.rs b/src/commands/repository.rs new file mode 100644 index 0000000..8646c06 --- /dev/null +++ b/src/commands/repository.rs @@ -0,0 +1,40 @@ +use clap::Args; + +#[derive(Args)] +pub struct RepositoryArgs { + /// Action (list, add, remove, set-url, get-url, enable, disable) + pub action: Option, + + /// Repository name + pub name: Option, + + /// Argument 1 (URL or type depending on action) + pub arg1: Option, + + /// Argument 2 + pub arg2: Option, + + /// Apply to the global config file + #[arg(short, long)] + pub global: bool, + + /// Use a specific config file + #[arg(short, long)] + pub file: Option, + + /// Append the repository instead of prepending it + #[arg(long)] + pub append: bool, + + /// Add before a specific repository + #[arg(long)] + pub before: Option, + + /// Add after a specific repository + #[arg(long)] + pub after: Option, +} + +pub fn execute(_args: &RepositoryArgs) { + todo!() +} -- cgit v1.3.1