1
use clap::Parser;
2

            
3
#[derive(Parser)]
4
#[command(author, version, about, long_about=None)]
5
struct Cli {
6
    // Continue without confirmation.
7
    #[arg(short, long, action)]
8
    yes: bool,
9

            
10
    // Install post-merge & post-rewrite hook to automatically run git-snip.
11
    #[arg(short, long, action)]
12
    install_hook: bool,
13
}
14

            
15
// Main entry point for git-snip.
16
fn main() {
17
    let cli = Cli::parse();
18
    git_snip::run(cli.yes, cli.install_hook);
19
}
20

            
21
#[cfg(test)]
22
#[test]
23
2
fn verify_cli() {
24
2
    use clap::CommandFactory;
25
2
    Cli::command().debug_assert()
26
2
}