diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-11 00:15:14 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-11 00:15:14 +0900 |
| commit | 8441abd29aea53719c19f34ec6d542a4575a23c9 (patch) | |
| tree | 2d5704acdae268253b69c4bb9a37653635037138 /src/commands/repository.rs | |
| parent | 9dacb9293f9b995c6c810227f73b4aa5cf019bab (diff) | |
| download | php-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.tar.gz php-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.tar.zst php-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.zip | |
define subcommands and options
Diffstat (limited to 'src/commands/repository.rs')
| -rw-r--r-- | src/commands/repository.rs | 40 |
1 files changed, 40 insertions, 0 deletions
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<String>, + + /// Repository name + pub name: Option<String>, + + /// Argument 1 (URL or type depending on action) + pub arg1: Option<String>, + + /// Argument 2 + pub arg2: Option<String>, + + /// Apply to the global config file + #[arg(short, long)] + pub global: bool, + + /// Use a specific config file + #[arg(short, long)] + pub file: Option<String>, + + /// Append the repository instead of prepending it + #[arg(long)] + pub append: bool, + + /// Add before a specific repository + #[arg(long)] + pub before: Option<String>, + + /// Add after a specific repository + #[arg(long)] + pub after: Option<String>, +} + +pub fn execute(_args: &RepositoryArgs) { + todo!() +} |
