mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 00:43:33 +01:00
Merge pull request #924 from jonathandturner/help_flags_last
Move flags help to last
This commit is contained in:
commit
7ef9f7702f
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user