Skip to content

Conversation

@WindSoilder
Copy link
Contributor

@WindSoilder WindSoilder commented Nov 15, 2024

Description

Fixes: #13159

After the change, std help will no-longer print out "double error" messages.

Actually I think it's tricky to make it right. To make help <cmd> keeps paging feature from fallback man command. I have to split commands into scope-commands and external-commands.

If we don't split it, simply call let commands = (try { commands $target_item --find $find }) in help main will cause us to lost paging feature, which is not we want.

A comment from original issue:

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.

Actually I think it's a beautiful feature of std help, so I want to keep it here.

User-Facing Changes

Before

> help commands asdfadsf
Help pages from external command asdfadsf:
No manual entry for asdfadsf
Error:   × std::help::command_not_found
   ╭─[entry #11:1:15]
 1  help commands asdfadsf
   ·               ────┬───
   ·                   ╰── command not found
   ╰────

After

> help commands asdfasdf
Help pages from external command asdfasdf:
No manual entry for asdfasdf

Tests + Formatting

Actually it's a little hard to add test because it required user input (especially for fallback man command)

@WindSoilder WindSoilder added the notes:fixes Include the release notes summary in the "Bug fixes" section label Nov 15, 2024
@NotTheDr01ds
Copy link
Contributor

Actually I think it's tricky to make it right.

This was my main concern when I looked at it initially. I wasn't sure it was worthwhile enough that someone would tackle it, but I'm glad you did!

@sholderbach sholderbach added the A:std-library Defining and improving the standard library written in Nu label Nov 15, 2024
@WindSoilder WindSoilder merged commit 186c084 into nushell:main Nov 27, 2024
13 checks passed
@WindSoilder WindSoilder deleted the std_help branch November 27, 2024 01:29
@github-actions github-actions bot added this to the v0.101.0 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:std-library Defining and improving the standard library written in Nu notes:fixes Include the release notes summary in the "Bug fixes" section

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad man fallback handling in std help

3 participants