dotnet / dotnet/command-line-api

Typo correction suggestions should go to IConsole.Error rather than IConsole.Out

Open
#2,003 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

System.CommandLine.Invocation.TypoCorrection writes to IConsole.Out. It should instead write to IConsole.Error, because the output does not come from an invoked Command and instead relates to the "Unrecognized command or argument" message that was written to IConsole.Error.

Observed in 2.0.0-beta4.22272.1.

_Originally noted in https://github.com/dotnet/command-line-api/pull/2001#discussion_r1054777220_

Contributor guide

Open the contributing guide

Research direction

Search the repository for System.CommandLine.Invocation.TypoCorrection and inspect where it writes to IConsole.Out or IConsole.Error. Confirm that typo suggestions accompany the “Unrecognized command or argument” message, then verify the relevant command-line behavior after the output destination is corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.