src/cli/format.rs - print_help: by default, use verbose output for simply commands

This commit is contained in:
Dietmar Maurer 2019-12-18 13:06:39 +01:00
parent 13007df318
commit d0349e9ba9

View File

@ -199,7 +199,7 @@ pub fn print_help(
top_def: &CommandLineInterface,
mut prefix: String,
args: &[String],
verbose: Option<bool>,
mut verbose: Option<bool>,
) {
let mut iface = top_def;
@ -222,6 +222,12 @@ pub fn print_help(
return;
}
if verbose.is_none() {
if let CommandLineInterface::Simple(_) = iface {
verbose = Some(true);
}
}
let format = match verbose.unwrap_or(false) {
true => DocumentationFormat::Full,
false => DocumentationFormat::Short,