mirror of
https://github.com/gay-pizza/jaarg.git
synced 2025-12-19 07:20:18 +00:00
Move help text and required flag to with chain, make help text optional
This commit is contained in:
@@ -8,10 +8,10 @@ use std::process::ExitCode;
|
||||
|
||||
fn main() -> ExitCode {
|
||||
const OPTIONS: Opts<&'static str> = Opts::new(&[
|
||||
Opt::help_flag("help", &["--help"], "Show this help"),
|
||||
Opt::positional("positional", "positional", "Positional argument"),
|
||||
Opt::value("value", &["-v", "--value"], "string", "Value option"),
|
||||
Opt::flag("flag", &["-f", "--flag"], "Flag option"),
|
||||
Opt::help_flag("help", &["--help"]).help_text("Show this help"),
|
||||
Opt::positional("positional", "positional").help_text("Positional argument"),
|
||||
Opt::value("value", &["-v", "--value"], "string").help_text("Value option"),
|
||||
Opt::flag("flag", &["-f", "--flag"]).help_text("Flag option"),
|
||||
]);
|
||||
|
||||
let map = match OPTIONS.parse_map_easy() {
|
||||
|
||||
Reference in New Issue
Block a user