Fixes to global completion, working in some cases now
parent
0089a69c57
commit
6aa7e15373
|
@ -36,12 +36,16 @@ class GlobalCommand extends BaseCommand
|
|||
$suggestions->suggestValues(array_filter(array_map(function (Command $command) {
|
||||
return $command->isHidden() ? null : $command->getName();
|
||||
}, $application->all())));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($application->has($commandName = $input->getArgument('command-name'))) {
|
||||
$input = $this->prepareSubcommandInput($input, true);
|
||||
$input = CompletionInput::fromString($input->__toString(), 3);
|
||||
$command = $this->getApplication()->find($commandName);
|
||||
$input = CompletionInput::fromString($input->__toString(), 2);
|
||||
$command = $application->find($commandName);
|
||||
$command->mergeApplicationDefinition();
|
||||
|
||||
$input->bind($command->getDefinition());
|
||||
$command->complete($input, $suggestions);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue