diff --git a/crates/nu-std/lib/help.nu b/crates/nu-std/lib/help.nu index 3702b4a8ea..6b5a9da452 100644 --- a/crates/nu-std/lib/help.nu +++ b/crates/nu-std/lib/help.nu @@ -246,13 +246,7 @@ export def "help modules" [ let module = ($module | str join " ") if not ($find | is-empty) { - let found_modules = ($modules | find $find --columns [name usage]) - - if ($found_modules | length) == 1 { - show-module ($found_modules | get 0) - } else { - $found_modules - } + $modules | find $find --columns [name usage] } else if not ($module | is-empty) { let found_module = ($modules | where name == $module) @@ -356,13 +350,7 @@ export def "help aliases" [ let alias = ($alias | str join " ") if not ($find | is-empty) { - let found_aliases = ($aliases | find $find --columns [name usage]) - - if ($found_aliases | length) == 1 { - show-alias ($found_aliases | get 0) - } else { - $found_aliases - } + $aliases | find $find --columns [name usage] } else if not ($alias | is-empty) { let found_alias = ($aliases | where name == $alias) @@ -402,13 +390,7 @@ export def "help externs" [ let extern = ($extern | str join " ") if not ($find | is-empty) { - let found_externs = ($externs | find $find --columns [name usage]) - - if ($found_externs | length) == 1 { - show-extern ($found_externs | get 0) - } else { - $found_externs - } + $externs | find $find --columns [name usage] } else if not ($extern | is-empty) { let found_extern = ($externs | where name == $extern) @@ -474,13 +456,7 @@ export def "help operators" [ let operator = ($operator | str join " ") if not ($find | is-empty) { - let found_operators = ($operators | find $find --columns [type name]) - - if ($found_operators | length) == 1 { - show-operator ($found_operators | get 0) - } else { - $found_operators - } + $operators | find $find --columns [type name] } else if not ($operator | is-empty) { let found_operator = ($operators | where name == $operator) @@ -664,13 +640,7 @@ export def "help commands" [ if not ($find | is-empty) { # TODO: impl find for external commands - let found_commands = ($commands | find $find --columns [name usage search_terms]) - - if ($found_commands | length) == 1 { - show-command ($found_commands | get 0) - } else { - $found_commands | select name category usage signatures search_terms - } + $commands | find $find --columns [name usage search_terms] | select name category usage signatures search_terms } else if not ($command | is-empty) { let found_commands = ($commands | where name == $command)