diff --git a/crates/nu-command/src/strings/str_/collect.rs b/crates/nu-command/src/strings/str_/collect.rs index a5832cdf0..ec217c59a 100644 --- a/crates/nu-command/src/strings/str_/collect.rs +++ b/crates/nu-command/src/strings/str_/collect.rs @@ -26,7 +26,7 @@ impl Command for StrCollect { } fn usage(&self) -> &str { - "'str collect' is deprecated. Please use 'str join' instead." + "Deprecated command" } fn run( diff --git a/crates/nu-engine/src/documentation.rs b/crates/nu-engine/src/documentation.rs index eefd4cc00..d24be36c1 100644 --- a/crates/nu-engine/src/documentation.rs +++ b/crates/nu-engine/src/documentation.rs @@ -69,7 +69,10 @@ fn get_documentation( if !config.no_subcommands { let signatures = engine_state.get_signatures(true); for sig in signatures { - if sig.name.starts_with(&format!("{} ", cmd_name)) { + if sig.name.starts_with(&format!("{} ", cmd_name)) + // Don't display deprecated commands in the Subcommands list + && !sig.usage.starts_with("Deprecated command") + { subcommands.push(format!(" {C}{}{RESET} - {}", sig.name, sig.usage)); } }