diff options
author | David Gay <eapoems@riseup.net> | 2023-10-16 15:48:29 -0400 |
---|---|---|
committer | David Gay <eapoems@riseup.net> | 2023-10-16 15:48:29 -0400 |
commit | 5ecd591a49c78f6059fc840ed5551ef7f5cad895 (patch) | |
tree | 2d4256d46d58aed2a7928d67542e9001c4259d3f /src/cli.rs | |
parent | 152cc94968badba24593a69d6d9917a6638ac659 (diff) |
CSV output for random henchmen
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1,4 +1,6 @@ -use clap::{arg, crate_authors, crate_description, crate_name, crate_version, Command}; +use clap::{ + arg, crate_authors, crate_description, crate_name, crate_version, Arg, ArgAction, Command, +}; pub fn cli() -> Command { Command::new(crate_name!()) @@ -12,7 +14,16 @@ pub fn cli() -> Command { Command::new("random") .about("Generates a random something") .args_conflicts_with_subcommands(true) - .subcommand(Command::new("henchman").about("Generates a random henchman")) + .subcommand( + Command::new("henchman") + .about("Generates a random henchman") + .arg( + Arg::new("csv") + .long("csv") + .action(ArgAction::SetTrue) + .help("Output in CSV format"), + ), + ) .subcommand(Command::new("magic").about("Generates a magic item")), ) .subcommand( |