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.
Currently,
CompletionAwareInterfacecan't cleanly useCompletionInterfaceimplementations. (eg. deferring path completion to the shell withShellPathCompletion). A simple solution might be another interface that exposesCompletionHandlerto commands: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.