git_override/cli.rs
1use clap::Parser;
2
3/// Commandline options
4#[derive(Debug, Parser)]
5#[clap(author, version, about, long_about = None, after_long_help = include_str!("cli/after_long_help.md"))]
6pub struct Options {
7 /// Pass arguments directly to upstream git without executing any overrides
8 #[clap(long)]
9 pub upstream: bool,
10
11 /// Arguments to pass to upstream git or overrides
12 pub args: Vec<String>,
13}
14
15impl Options {
16 pub fn parse() -> Options {
17 // This simply exports the trait method without caller needing to use the trait:
18 <Options as Parser>::parse()
19 }
20}