Skip to content

Conversation

adamsitnik
Copy link
Member

Copy link
Member

@baronfel baronfel left a comment

Choose a reason for hiding this comment

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

Based on dotnet/diagnostics#5493 (comment) this seems like a reasonable way to go - but my expectation is that if someone did want to override this value, they'd have to

  • ensure the default help option was not added to the tree
  • create their own help option
  • assign that help option a customized HelpAction using this new API

is that correct?

@adamsitnik
Copy link
Member Author

is that correct?

That is correct. It takes some effort to do it, but I expect it to be rare.

@adamsitnik adamsitnik merged commit 05056c3 into dotnet:main Jul 22, 2025
10 checks passed
{
try
{
_maxWidth = Console.IsOutputRedirected ? int.MaxValue : Console.WindowWidth;
Copy link
Member

Choose a reason for hiding this comment

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

Will something cause reevaluation on resizing the console host?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will something cause reevaluation on resizing the console host?

No. This value will be requested a moment before the help is going to be displayed. And in 99.9% of the cases that will be the last thing the program does before exit.

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.

3 participants