use clap::Parser; #[derive(Parser, Debug)] #[clap(version)] struct Args { #[clap(short, long, help = "Path to config")] config: Option<PathBuf>, } fn main() { let args = Args::parse(); println!("{:?}", args); }