From 823b8299bb88013ce900e2f8d4b5745556380c72 Mon Sep 17 00:00:00 2001 From: Lakelezz <12222135+Lakelezz@users.noreply.github.com> Date: Tue, 11 Sep 2018 18:54:28 +0200 Subject: Add missing usage on plain help (#386) --- src/framework/standard/help_commands.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs index f7c6b48..7104525 100644 --- a/src/framework/standard/help_commands.rs +++ b/src/framework/standard/help_commands.rs @@ -775,7 +775,7 @@ fn grouped_commands_to_plain_string( result } -/// Turns a single into a `String` taking plain help format into account. +/// Turns a single command into a `String` taking plain help format into account. fn single_command_to_plain_string(help_options: &HelpOptions, command: &Command) -> String { let mut result = String::default(); let _ = writeln!(result, "**{}**", command.name); @@ -788,6 +788,10 @@ fn single_command_to_plain_string(help_options: &HelpOptions, command: &Command) let _ = writeln!(result, "**{}**: {}", help_options.description_label, description); }; + if let &Some(ref usage) = &command.usage { + let _ = writeln!(result, "**{}**: {}", help_options.usage_label, usage); + } + let _ = writeln!(result, "**{}**: {}", help_options.grouped_label, command.group_name); let _ = writeln!(result, "**{}**: {}", help_options.available_text, command.availability); -- cgit v1.2.3