mirror of
https://github.com/nushell/nushell
synced 2024-11-15 01:17:07 +00:00
Return an empty list when no std help --find
results are found (#13160)
# Description Fixes #13143 by returning an empty list when there are no results found by `std help --find/-f` # User-Facing Changes In addition, prints a message to stderr. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. -->
This commit is contained in:
parent
b1cf0e258d
commit
3a6d8aac0b
1 changed files with 5 additions and 0 deletions
|
@ -771,6 +771,11 @@ You can also learn more at (ansi default_italic)(ansi light_cyan_underline)https
|
|||
|
||||
let modules = (try { modules $target_item --find $find })
|
||||
if not ($modules | is-empty) { return $modules }
|
||||
|
||||
if ($find | is-not-empty) {
|
||||
print -e $"No help results found mentioning: ($find)"
|
||||
return []
|
||||
}
|
||||
|
||||
let span = (metadata $item | get span)
|
||||
error make {
|
||||
|
|
Loading…
Reference in a new issue