diff --git a/crates/nu-command/tests/format_conversions/html.rs b/crates/nu-command/tests/format_conversions/html.rs
index f705bd826..5e36b3d0e 100644
--- a/crates/nu-command/tests/format_conversions/html.rs
+++ b/crates/nu-command/tests/format_conversions/html.rs
@@ -56,7 +56,7 @@ fn test_cd_html_color_flag_dark_false() {
);
assert_eq!(
actual.out,
- r"
Change directory.
Usage:
> cd (path)
Flags:
-h, --help
Display this help message
Parameters:
(optional) path: the path to change to
Examples:
Change to your home directory
> cd ~
Change to a directory via abbreviations
> cd d/s/9
"
+ r"Change directory.
Usage:
> cd (path)
Flags:
-h, --help
Display this help message
Parameters:
(optional) path <Directory>: the path to change to
Examples:
Change to your home directory
> cd ~
Change to a directory via abbreviations
> cd d/s/9
"
);
}
@@ -71,6 +71,6 @@ fn test_no_color_flag() {
);
assert_eq!(
actual.out,
- r"Change directory.
Usage:
> cd (path)
Flags:
-h, --help
Display this help message
Parameters:
(optional) path: the path to change to
Examples:
Change to your home directory
> cd ~
Change to a directory via abbreviations
> cd d/s/9
"
+ r"Change directory.
Usage:
> cd (path)
Flags:
-h, --help
Display this help message
Parameters:
(optional) path <Directory>: the path to change to
Examples:
Change to your home directory
> cd ~
Change to a directory via abbreviations
> cd d/s/9
"
);
}
diff --git a/crates/nu-engine/src/documentation.rs b/crates/nu-engine/src/documentation.rs
index aaf9a5466..8d3ef97b6 100644
--- a/crates/nu-engine/src/documentation.rs
+++ b/crates/nu-engine/src/documentation.rs
@@ -87,19 +87,22 @@ fn get_documentation(
{
long_desc.push_str("\nParameters:\n");
for positional in &sig.required_positional {
- long_desc.push_str(&format!(" {}: {}\n", positional.name, positional.desc));
+ long_desc.push_str(&format!(
+ " {} <{:?}>: {}\n",
+ positional.name, positional.shape, positional.desc
+ ));
}
for positional in &sig.optional_positional {
long_desc.push_str(&format!(
- " (optional) {}: {}\n",
- positional.name, positional.desc
+ " (optional) {} <{:?}>: {}\n",
+ positional.name, positional.shape, positional.desc
));
}
if let Some(rest_positional) = &sig.rest_positional {
long_desc.push_str(&format!(
- " ...{}: {}\n",
- rest_positional.name, rest_positional.desc
+ " ...{} <{:?}>: {}\n",
+ rest_positional.name, rest_positional.shape, rest_positional.desc
));
}
}