rad/src/cli.rs

21 lines
565 B
Rust

use clap::Parser;
const AUTHOR: &str = "TheTechRobo";
const VERSION: &str = "v.0.1";
const ABOUT: &str = "yad clone";
#[derive(Parser, Debug)]
#[clap(author=AUTHOR, version=VERSION, about=ABOUT)]
pub struct Args {
// Window height
#[clap(long="height", short='h', default_value="400")]
pub height: i32,
// Window width
#[clap(long="width", short='w', default_value="500")]
pub width: i32,
#[clap(long="title", default_value="Window")]
pub title: String,
#[clap(long="field", multiple=true)]
pub form_fields: Vec<String>,
}