Parse basic args

This commit is contained in:
Joscha 2023-01-23 08:42:55 +01:00
parent 2837927e2d
commit a82db1b204
3 changed files with 331 additions and 2 deletions

View file

@ -1,3 +1,15 @@
fn main() {
println!("Hello, world!");
use std::path::PathBuf;
use clap::Parser;
#[derive(Debug, Parser)]
struct Args {
/// Path to a git repository.
#[arg(default_value = ".")]
repo: PathBuf,
}
fn main() {
let args = Args::parse();
println!("Args: {args:#?}");
}