dotnet / dotnet/command-line-api
Interactive mode and tab completion
Open
Area-Completions
enhancement
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
There are some command line programs that are resource intensive to start, most of them provide interactive mode.
My app's interactive mode implementation:
```csharp
while (true)
{
Console.Write("> ");
string? args = Console.ReadLine();
if (string.IsNullOrWhiteSpace(args))
{
Log.Warning("No args entered");
continue;
}
await rootCommand.InvokeAsync(args);
}
```
But when I try to add tab completion, I get stuck. Currently, there's no public API to acquire suggestions manually and placing them into console. A build-in interactive mode API would be great.
Contributor guide
Assessment
This issue has not been assessed yet.