From 7a595827f140818f194c0ef076afb102cfd28559 Mon Sep 17 00:00:00 2001 From: Shaurya Date: Mon, 21 Sep 2020 13:27:26 +0530 Subject: [PATCH] Fix subcommands column on `help commands` (#2584) --- crates/nu-cli/src/commands/help.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/nu-cli/src/commands/help.rs b/crates/nu-cli/src/commands/help.rs index 3a12abe374..879e4ee467 100644 --- a/crates/nu-cli/src/commands/help.rs +++ b/crates/nu-cli/src/commands/help.rs @@ -107,7 +107,6 @@ async fn help(args: CommandArgs, registry: &CommandRegistry) -> Result Result>, name: Tag, ) -> Result { - let (matching, not_matching) = subcommand_names - .drain(..) - .partition(|subcommand_name| subcommand_name.starts_with(cmd_name)); + let (matching, not_matching) = + subcommand_names.drain(..).partition(|subcommand_name| { + subcommand_name.starts_with(&format!("{} ", cmd_name)) + }); *subcommand_names = not_matching; Ok(if !matching.is_empty() { UntaggedValue::table(