mirror of
https://github.com/nushell/nushell
synced 2024-12-26 21:13:19 +00:00
Merge pull request #924 from jonathandturner/help_flags_last
Move flags help to last
This commit is contained in:
commit
7ef9f7702f
1 changed files with 4 additions and 3 deletions
|
@ -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 a new issue