From 44a1686a7603511d9140ece1a42521a9f3d6ecc2 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Wed, 6 Nov 2019 15:28:26 +1300 Subject: [PATCH] Move flags help to last --- src/commands/help.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/commands/help.rs b/src/commands/help.rs index d5f755f67d..596bcbf930 100644 --- a/src/commands/help.rs +++ b/src/commands/help.rs @@ -61,9 +61,6 @@ impl PerItemCommand for Help { let mut one_liner = String::new(); one_liner.push_str(&signature.name); one_liner.push_str(" "); - if signature.named.len() > 0 { - one_liner.push_str("{flags} "); - } for positional in &signature.positional { match &positional.0 { @@ -80,6 +77,10 @@ impl PerItemCommand for Help { one_liner.push_str(&format!(" ...args",)); } + if signature.named.len() > 0 { + one_liner.push_str("{flags} "); + } + long_desc.push_str(&format!("\nUsage:\n > {}\n", one_liner)); if signature.positional.len() > 0 || signature.rest_positional.is_some() {