FIX: have consistent errors between std help and std help ...#9101
Merged
fdncred merged 1 commit intonushell:mainfrom May 8, 2023
Merged
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #9101 +/- ##
==========================================
- Coverage 68.71% 68.71% -0.01%
==========================================
Files 640 640
Lines 101681 101681
==========================================
- Hits 69873 69866 -7
- Misses 31808 31815 +7 |
Contributor
|
But wouldn't it be better if the error could point to the span containing the actually-not-found command? You can do this by avoiding shadowing parameter |
Member
Author
Contributor
|
Ah, missed that. Thanks for fixing it! |
Contributor
|
thanks |
amtoine
added a commit
that referenced
this pull request
May 12, 2023
related to - #9101 - #9039 # Description i actually forgot to fix in #9039 the new "*item*" introduced by #9101... 👀 there it is 😇 # User-facing changes going from ``` > std help git-commiteuwqi Help pages from external command git-commiteuwqi: No manual entry for git-commiteuwqi Error: × std::help::item_not_found ╭─[help:721:1] 721 │ 722 │ let item = ($item | str join " ") · ─┬─ · ╰── item not found 723 │ ╰──── ``` to ``` > std help git-commiteuwqi Help pages from external command git-commiteuwqi: No manual entry for git-commiteuwqi Error: × std::help::item_not_found ╭─[entry #2:1:1] 1 │ std help git-commiteuwqi · ───────┬─────── · ╰── item not found ╰──── ``` # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - ⚫ `toolkit test` - ⚫ `toolkit test stdlib` # After Submitting ``` $nothing ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
an example should show what happens quite clearly 😋
in all cases we get
but
❌ before this PR
without any error, which makes it inconsistent with all the other
std helpcommands which give errors when not finding an item 🤔✔️ with this PR
User-Facing Changes
more consistent errors when using
std helpandstd help commands, as shown above.Tests + Formatting
After Submitting