Skip to content

Allow CompletionAwareInterface commands to use/register Completion instances #32

@stecman

Description

@stecman

Currently, CompletionAwareInterface can't cleanly use CompletionInterface implementations. (eg. deferring path completion to the shell with ShellPathCompletion). A simple solution might be another interface that exposes CompletionHandler to commands:

interface CompletionConfigurationInterface
{
    public function configureCompletion(CompletionHandler $handler);
}

In saying that, this makes me think that the responsibility for completion configuration (command name, argument/option, name) shouldn't really belong to CompletionInterface. It was a convenience when the code was originally created to have the API like that, but it doesn't entirely make sense and it means that completions require information they don't actually need to run.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions