dotnet / dotnet/command-line-api

Inappropriate typo suggestion for argument of option

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

Description

In --option=argument syntax, if the argument is not accepted by the option, then typo correction can suggest replacing the argument with a different option. That should not happen when they are connected by an equals sign.

## Demo

```XML


Exe
net6.0
enable
enable



```

```C#
using System.CommandLine;

return new RootCommand().Invoke(args);
```

```
$ dotnet run -- --version=h-
'h-' was not matched. Did you mean one of the following?
-h
1.0.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.