dotnet / dotnet/docs

The example code does not work as intended

Open
#48,478 0 comments 0 reactions 1 assignee Claimed by @gewarren View on GitHub
:pushpin: seQUESTered dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
19h 10m
Merged PRs (30d)
268

Description

### 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](https://github.com/dotnet/docs/issues?q=is%3Aissue+is%3Aopen+83a46989-fc35-84a8-c240-2285440c8eb2)

---
[Associated WorkItem - 537292](https://dev.azure.com/msft-skilling/Content/_workitems/edit/537292)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.