diff options
author | Daniel Schadt <kingdread@gmx.de> | 2021-11-09 18:57:36 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2021-11-09 18:57:36 +0100 |
commit | 9fbfa349a1973610287879ceb926c6d10b4b539f (patch) | |
tree | 8e7ea263a56762e41e62ef95d347f05126618a8f | |
parent | 0568defd3fe3481035b2d249ea2376f3ffdf69c1 (diff) | |
download | modderbaas-9fbfa349a1973610287879ceb926c6d10b4b539f.tar.gz modderbaas-9fbfa349a1973610287879ceb926c6d10b4b539f.tar.bz2 modderbaas-9fbfa349a1973610287879ceb926c6d10b4b539f.zip |
enable SubcommandRequired & ColoredHelp
Especially SubcommandRequired is helpful, as without one, we're not
doing all that much.
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 5b8c19c..817d39b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use std::{ }; use anyhow::{anyhow, bail, Context, Result}; -use clap::{crate_version, App, Arg, ArgMatches, SubCommand}; +use clap::{crate_version, App, AppSettings, Arg, ArgMatches, SubCommand}; use itertools::Itertools; use log::debug; use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor}; @@ -76,6 +76,7 @@ fn main() -> Result<()> { .required(false), ), ) + .settings(&[AppSettings::SubcommandRequired, AppSettings::ColoredHelp]) .get_matches(); let mut stdout = StandardStream::stdout(ColorChoice::Auto); |