diff_tool/services/cli.rs
1use clap::Parser;
2use std::path::{Path, PathBuf};
3
4#[derive(Parser, Default, Debug)]
5#[command(author = "Ddraigan", version, about = "A side by side git diff view")]
6pub struct Args {
7 #[clap(short = 'C', long)]
8 /// Giving a full path allows diff-tool to diff outside of the git repo
9 change_dir: bool,
10 /// File to diff with
11 path: PathBuf,
12 // #[clap(short, long, default_value_t = 250)]
13 // tick_rate: u64,
14 // TODO: Add tick rate arg
15}
16
17impl Args {
18 pub fn path(&self) -> &Path {
19 &self.path
20 }
21
22 pub fn change_dir(&self) -> bool {
23 self.change_dir
24 }
25
26 // pub fn tick_rate(&self) -> u64 {
27 // self.tick_rate
28 // }
29}