Skip to content

Interactive mode and tab completion #1319

Open
@CCRcmcpe

Description

@CCRcmcpe

There are some command line programs that are resource intensive to start, most of them provide interactive mode.
My app's interactive mode implementation:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CompletionsRelated to support for tab completionenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions