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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
use crate::{Method, Target};

#[derive(clap::Parser, Debug)]
#[command(author, version, about, long_about = None)]
pub struct Cli {
    /// source, file or directory
    #[arg(short, long, required = true, value_name("Source"))]
    pub input: String,

    /// target
    #[arg(short, long, value_enum, default_value_t = Target::File)]
    pub target: Target,

    /// methods
    #[arg(short, long, value_enum, default_value_t = Method::Time)]
    pub method: Method,

    /// doing recursively
    #[arg(short, long)]
    pub recursive: bool,

    /// depth when doing recursively
    #[arg(short, long)]
    pub depth: Option<usize>,

    /// the number of bit
    #[arg(short, long, default_value_t = 10)]
    pub nbits: usize,

    /// initial number
    #[arg(short, long, default_value_t = 1)]
    pub start: usize,

    /// text string
    #[arg(long)]
    pub with: Option<String>,

    /// delimiter
    #[arg(long, default_value_t = String::from("-"))]
    pub delimiter: String,

    /// preserve consistent file stems
    #[arg(long)]
    pub indiscriminate: bool,

    // /// TODO
    // #[arg(short, long)]
    // pub hidden_included: bool,
    /// detailed log
    #[arg(short, long)]
    pub verbose: bool,

    /// execute without asking
    #[arg(short, long)]
    pub yes: bool,

    /// interaction mode
    #[arg(long)]
    pub it: bool,

    /// roll back
    #[arg(long)]
    pub roll: bool,

    /// cache file
    #[arg(long, default_value_t = String::from(".renify_cache"))]
    pub cache: String,
}