zenyx-engine/engine/src/cli/mod.rs

27 lines
750 B
Rust

use clap::{Arg, Command};
#[derive(Debug)]
pub struct Cli {}
pub fn parse() {
let matches = Command::new("zenyx")
.version(env!("CARGO_PKG_VERSION"))
.author(env!("CARGO_PKG_AUTHORS"))
.about(env!("CARGO_PKG_DESCRIPTION"))
.arg(
Arg::new("name")
.short('n')
.long("name")
.value_name("NAME")
.help("Sets a custom name"),
)
.subcommand(
Command::new("greet").about("Greets the given name").arg(
Arg::new("person")
.value_name("PERSON")
.help("The person to greet")
.required(true),
),
)
.get_matches();
}