Skip to content

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

Closed

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]
 1 │ help -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

Activity

  1. added
    status:needs-triage
    on Jun 13, 2024
  2. fdncred commented on Jun 13, 2024

    @fdncred
    Contributor

    switching to std help is a good dogfooding exercise. One of the reasons why we never made this the permanent solution is because it was so much slower. It would be good to be able to use the stdlib to do this if we can keep up with performance and all new commands are discoverable without having to change the stdlib code.

  3. added a commit that references this issue on Jun 14, 2024
  4. added
    A:std-library
    on Jun 14, 2024
  5. added a commit that references this issue on Jun 15, 2024
    3a6d8aa
  6. added this to the v0.95.0 milestone on Jun 16, 2024
  7. added a commit that references this issue on Jun 20, 2024
    8223a4d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:std-librarystatus:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions