summaryrefslogtreecommitdiff
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 226b06a..4fdef22 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -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(