Skip to content

The "IS_ARRAY" argument aren't auto-completed #72

Open
@aik099

Description

@aik099

I have argument defined with InputArgument::REQUIRED | InputArgument::IS_ARRAY options, which means all non-matched arguments in command line are assigned to this one.

During auto-complete the 1st match is auto-completed just fine, but next matches aren't auto-completed at all.

The issue is in \Stecman\Component\Symfony\Console\BashCompletion\CompletionHandler::mapArgumentsToWords method, that only matches 1 word to 1 argument. So if I have more words then arguments the rest words are just not mapped anywhere, but should be mapped to array-type argument.

See the InputDefinition of Symfony Console for actual processing logic, but generally last defined array argument accepts all non-matched arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions