Return an empty list when no help --find results are found

This commit is contained in:
NotTheDr01ds 2024-06-15 12:25:46 -04:00
parent 323d5457f9
commit 19d24fd353

View File

@ -772,6 +772,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 {
msg: ("std::help::item_not_found" | error-fmt)