Skip to content

Conversation

@rvuistin
Copy link
Contributor

@rvuistin rvuistin commented Nov 8, 2025

If you specify the complete name of a command that contains subcommands and options, the expected behavior for completions is:
• Subcommands: All direct subcommands of the specified command should be suggested as completions.
• Options: All options available for that command (including inherited/global options, if any) should also be suggested as completions.

For example, if you have a command structure like:

root
└── parentcmd
    ├── subcmd1
    ├── subcmd2
    └── --option1

When you type:

parentcmd [TAB]

or use the [suggest] directive with parentcmd, the completion list should include:

subcmd1
subcmd2
--option1

Changes:

  • enhanced completion logic to handle cases where the text to match is the command name or is null, ensuring all relevant completions (subcommands, options, arguments) are suggested.

  • updated CompletionAction in CompletionAction.cs to process multiple tokens for command-line completion, improving support for multi-token inputs.

- enhanced completion logic to handle cases where the text to match is the command name or is `null`, ensuring all relevant completions (subcommands, options, arguments) are suggested.

- updated `CompletionAction` in `CompletionAction.cs` to process multiple tokens for command-line completion, improving support for multi-token inputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant