aboutsummaryrefslogtreecommitdiff
path: root/src/cli.rs
blob: bb0c621642bf2a41651a7a5311434dc5400f2073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::path::PathBuf;
use clap::{Parser, Subcommand};

#[derive(Parser)]
#[clap(author = "Max Bossing", version, about = "System-agnostic dotfile deployer", long_about = None)]
pub struct Cli {
    #[arg(short, long, default_value = "dots.toml")]
    pub config: Option<PathBuf>,
    #[arg(short, long)]
    pub no_hostname_check: bool,
    #[command(subcommand)]
    pub command: CliCommand 
}

#[derive(Subcommand)]
pub enum CliCommand {
    #[clap(about = "Deploys a dots set")]
    Deploy,
    #[clap(about = "Unlinks (tries to remove) a dots deployment")]
    Unlink
}