Merge pull request #924 from jonathandturner/help_flags_last

Move flags help to last
This commit is contained in:
Jonathan Turner 2019-11-06 15:50:25 +13:00 committed by GitHub
commit 7ef9f7702f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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() {