aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/repository.rs
blob: 3a094cc6305aadbcc005aaffd108b5a7ade24917 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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, _cli: &super::Cli) -> anyhow::Result<()> {
    todo!()
}