Skip to content

The example code does not work as intended #48478

@Zindre17

Description

@Zindre17

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

Metadata

Metadata

Assignees

Type

No type

Projects

Status

🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions