dot_linker/
cli.rs

1use clap::Parser;
2use std::path::PathBuf;
3
4#[derive(Parser, Debug)]
5#[command(version, about="symlink's your dots", long_about = None)]
6pub struct Args {
7    /// The directory to symlink to
8    #[clap(short, long)]
9    pub target: Option<PathBuf>,
10
11    /// The directory to symlink from
12    #[clap(value_name = "DIR")]
13    pub dir: Option<PathBuf>,
14
15    /// The files to symlink highier precedence than dir
16    #[clap(short, long, value_name = "FILE", num_args=1.. )]
17    pub files: Option<Vec<String>>,
18
19    /// The files to ignore
20    #[clap(short, long, value_name = "IGNORE", num_args=1.. )]
21    pub ignore: Option<Vec<String>>,
22
23    /// simulate the  symlink no actual linking
24    #[clap(short, long, default_value_t = false)]
25    pub no_symlink: bool,
26
27    /// asks for confirmation before actions
28    #[clap(short, long, default_value_t = false)]
29    pub visual: bool,
30
31    /// prints verbose output
32    #[clap(long, default_value_t = false)]
33    pub verbose: bool,
34
35    /// unset symlink
36    #[clap(short, long, default_value_t = false)]
37    pub unset: bool,
38
39    /// path to config file
40    #[clap(short, long)]
41    pub config: Option<String>,
42}