Skip to content

Fix #2128 - #2656

Merged
jonsequitur merged 5 commits into
dotnet:mainfrom
jonsequitur:fix-2128
Aug 13, 2025
Merged

Fix #2128#2656
jonsequitur merged 5 commits into
dotnet:mainfrom
jonsequitur:fix-2128

Conversation

@jonsequitur

Copy link
Copy Markdown
Contributor

This fixes #2128. When Option.HelpName isn't supplied, the Option.Name (with prefixes removed) is used.

@jonsequitur
jonsequitur requested a review from baronfel August 8, 2025 20:29
@jonsequitur
jonsequitur enabled auto-merge (squash) August 8, 2025 20:49

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the change LGTM, as usual with great tests from @jonsequitur 👍

I was about to mention that it will most likely break plenty of SDK tests (I remember I had to add HelpName here and there when updating), but then I've realized that the change was made in HelpBuilder.Default.cs and since the SDK has its own copy, it should not be affected.

Thanks!

Comment thread src/System.CommandLine/Help/HelpBuilder.Default.cs Outdated
@jonsequitur
jonsequitur merged commit e292617 into dotnet:main Aug 13, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--help no longer displays the option argument if Option.HelpName is not set

2 participants