Skip to content

std help -f errors when there are no results #13143

@NotTheDr01ds

Description

@NotTheDr01ds

Describe the bug

(Note: I should be able to fix this - Just filing it as a TODO for myself. If someone beats me to it, I won't be disappointed, but I should get to it soon).

I recently shifted over to running use std help by default. I was just searching the help for the word "else" and got an error. Retested with the builtin help and it works fine, albeit there are no results (so I need to add a search term to if, at the least).

How to reproduce

> help -f else
╭────────────╮
│ empty list │
╰────────────╯
> use std help
> help -f else
Error:   × std::help::item_not_found
   ╭─[entry #54:1:1]
 1help -f else
   · ──┬─
   ·   ╰── item not found
   ╰────

Expected behavior

std help -f should return an empty list when there are no results.

Screenshots

No response

Configuration

key value
version 0.94.2
major 0
minor 94
patch 2
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.77.2 (25ef9e3d8 2024-04-09)
rust_channel 1.77.2-x86_64-unknown-linux-gnu
cargo_version cargo 1.77.2 (e52e36006 2024-03-26)
build_time 2024-06-10 14:29:01 -04:00
build_rust_channel release
allocator mimalloc
features default, sqlite, system-clipboard, trash, which
installed_plugins

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:std-libraryDefining and improving the standard library written in Nustatus:needs-triageAn issue that hasn't had any proper look

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions