aboutsummaryrefslogtreecommitdiff
path: root/src/cli.rs
blob: f43bda4f07230b1eaa6dbb57e9bbfa5f76c9f9f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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>,
    
    #[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
}