docs icon indicating copy to clipboard operation
docs copied to clipboard

The example code does not work as intended

Open Zindre17 opened this issue 3 months ago • 0 comments

Type of issue

Code doesn't work

Description

The example code for tab-completion calls .Parse(args).Invoke() on a Command. This results in the result of SetAction to become the completion suggestion instead of suggesting from the completion sources. For tab-completion and help to work, .Parse(args).Invoke() must be called on a RootCoomand instead.

Page URL

https://learn.microsoft.com/en-us/dotnet/standard/commandline/how-to-enable-tab-completion

Content source URL

https://github.com/dotnet/docs/blob/main/docs/standard/commandline/how-to-enable-tab-completion.md

Document Version Independent Id

83a46989-fc35-84a8-c240-2285440c8eb2

Platform Id

65817997-1ebe-60b0-2b33-1934d6872c0b

Article author

@gewarren

Metadata

  • ID: 827322e7-7584-5d7e-4f15-c0330e68d879
  • PlatformId: 65817997-1ebe-60b0-2b33-1934d6872c0b
  • Service: dotnet-fundamentals

Related Issues


Associated WorkItem - 537292

Zindre17 avatar Sep 13 '25 07:09 Zindre17