mirror of
https://github.com/nushell/nushell
synced 2024-12-27 13:33:16 +00:00
Move flags help to last
This commit is contained in:
parent
15c6d24178
commit
44a1686a76
1 changed files with 4 additions and 3 deletions
|
@ -61,9 +61,6 @@ impl PerItemCommand for Help {
|
||||||
let mut one_liner = String::new();
|
let mut one_liner = String::new();
|
||||||
one_liner.push_str(&signature.name);
|
one_liner.push_str(&signature.name);
|
||||||
one_liner.push_str(" ");
|
one_liner.push_str(" ");
|
||||||
if signature.named.len() > 0 {
|
|
||||||
one_liner.push_str("{flags} ");
|
|
||||||
}
|
|
||||||
|
|
||||||
for positional in &signature.positional {
|
for positional in &signature.positional {
|
||||||
match &positional.0 {
|
match &positional.0 {
|
||||||
|
@ -80,6 +77,10 @@ impl PerItemCommand for Help {
|
||||||
one_liner.push_str(&format!(" ...args",));
|
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));
|
long_desc.push_str(&format!("\nUsage:\n > {}\n", one_liner));
|
||||||
|
|
||||||
if signature.positional.len() > 0 || signature.rest_positional.is_some() {
|
if signature.positional.len() > 0 || signature.rest_positional.is_some() {
|
||||||
|
|
Loading…
Reference in a new issue