mirror of
https://github.com/nushell/nushell.git
synced 2024-11-08 01:24:38 +01:00
ensure required
positionals don't show up as optional
when help
(#5916)
* ensure `required` positionals show up as `required` when `help` * moves it to the older format * standardises across optional and required parameters
This commit is contained in:
parent
a0db4ce747
commit
cf0877bf72
@ -89,12 +89,13 @@ fn get_documentation(
|
||||
{
|
||||
long_desc.push_str("\nParameters:\n");
|
||||
for positional in &sig.required_positional {
|
||||
long_desc.push_str(&format!(
|
||||
" (optional) {} <{:?}>: {}\n",
|
||||
let _ = writeln!(
|
||||
long_desc,
|
||||
" {} <{:?}>: {}",
|
||||
positional.name,
|
||||
document_shape(positional.shape.clone()),
|
||||
positional.desc
|
||||
));
|
||||
);
|
||||
}
|
||||
for positional in &sig.optional_positional {
|
||||
let _ = writeln!(
|
||||
|
Loading…
Reference in New Issue
Block a user