commandlineparser / commandlineparser/commandline

When `IgnoreUnknownArguments` is true, do not assume any single-dash argument matches a correlating short character option

Open
#834 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.8k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

Currently, Tokenizer will assume a match for a short option when it encounters a single-dash argument, when the first character matches. This is unexpected when `IgnoreUnknownArguments` is set to true--since it should ignore unknown arguments.

https://github.com/commandlineparser/commandline/blob/b0b0ec9f5470bacc0823c013a599ba3b4e115900/src/CommandLine/Core/Tokenizer.cs#L172-L183

Contributor guide

No contributing guide indexed for this repository

Research direction

Review src/CommandLine/Core/Tokenizer.cs around lines 172-183 and trace how single-dash arguments are matched when IgnoreUnknownArguments is true. Confirm the change by checking that an unknown single-dash argument is ignored rather than correlated to a short option, while valid short options retain their behavior.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.