Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baronfel/scl-dynamic-completion
https://github.com/baronfel/scl-dynamic-completion
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/baronfel/scl-dynamic-completion
- Owner: baronfel
- License: mit
- Created: 2022-01-26T22:17:40.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-03T19:08:12.000Z (almost 3 years ago)
- Last Synced: 2024-10-20T08:56:25.641Z (27 days ago)
- Language: C#
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dynamic System.CommandLine completion sample
This sample illustrates the use of `GetCompletions` to generate dynamic
completions for a command. This command wants to suggest dates in the future,
but cannot know the current date at compile-time, only at runtime.To test this:
* run the app with `dotnet run [suggest] "some appointment" --date ""`
* you should see the next two weeks of dates printed to the command line:```shell
PS C:\Users\chethusk\oss\Scratch\scl-dynamic-completion> dotnet run [suggest] "blah blah" --date "1"
1/27/2022
1/28/2022
1/29/2022
1/30/2022
1/31/2022
2/1/2022
2/2/2022
2/3/2022
2/4/2022
2/5/2022
2/6/2022
2/7/2022
2/8/2022
2/9/2022
```