-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Bad man fallback handling in std help #13159
Copy link
Copy link
Closed
Labels
A:help-systemRelated to help commands and our documentation system (not docs itself)Related to help commands and our documentation system (not docs itself)A:std-libraryDefining and improving the standard library written in NuDefining and improving the standard library written in Nucategory:bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Milestone
Description
Describe the bug
std help is pretty wonky right now when it doesn't find a result, and sometimes even when it does.
How to reproduce
> use std help
> help ls
# happy case - Works and displays the proper help
> help asdf
Help pages from external command asdf:
No manual entry for asdf
Error: × std::help::item_not_found
╭─[entry #5:1:6]
1 │ help asdf
· ──┬─
· ╰── item not found
╰────In the basic "not found" example, std help first tries to fallback to man to see if there is a man page for the requested item. It therefore gives a bit of a "double error", with the man page error and the item_not_found error printing.
> help sed
# displays the sed man page ... then, when exiting man ...
Help pages from external command sed:
Error: × std::help::item_not_found
╭─[entry #8:1:6]
1 │ help sed
· ─┬─
· ╰── item not found
╰────If it was found, even as a man page, then it shouldn't result in an error ...
> help shells
# Displays the man page for "shells" ... then, when exiting displays the alias help for shells->showExpected behavior
Not as much wonkyness.
If there are no objections, I'd like to remove the man page fallback code from std help for the moment. While it's probably fixable, it's also platform specific and requires testing on all platforms. It also seems like a low-value add here.
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 | jwalk |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:help-systemRelated to help commands and our documentation system (not docs itself)Related to help commands and our documentation system (not docs itself)A:std-libraryDefining and improving the standard library written in NuDefining and improving the standard library written in Nucategory:bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers