update lock clucknut
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 14s
Build, Push and Deploy / build-and-push (push) Successful in 3m14s
Build, Push and Deploy / deploy-staging (push) Successful in 25s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-18 20:32:18 +07:00
parent 4554035227
commit dcaf267458
3359 changed files with 153185 additions and 205489 deletions

View File

@@ -115,24 +115,30 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'<info>Messages:</>',
]);
$command = $this->findCommand($completionInput, $output);
if ($command = $this->findCommand($completionInput, $output)) {
$command->mergeApplicationDefinition();
$completionInput->bind($command->getDefinition());
}
if (null === $command) {
$this->log(' No command found, completing using the Application class.');
$this->getApplication()->complete($completionInput, $suggestions);
} elseif (
$completionInput->mustSuggestArgumentValuesFor('command')
&& $command->getName() !== $completionInput->getCompletionValue()
&& !\in_array($completionInput->getCompletionValue(), $command->getAliases(), true)
) {
$this->log(' No command found, completing using the Application class.');
$this->log(' Command found, completing command name.');
// expand shortcut names ("cache:cl<TAB>") into their full name ("cache:clear")
$suggestions->suggestValues(array_filter(array_merge([$command->getName()], $command->getAliases())));
$commandNames = array_filter(array_merge([$command->getName()], $command->getAliases()));
foreach ($commandNames as $name) {
if (str_starts_with($name, $completionInput->getCompletionValue())) {
$commandNames = [$name];
break;
}
}
$suggestions->suggestValues($commandNames);
} else {
$command->mergeApplicationDefinition();
$completionInput->bind($command->getDefinition());
if (CompletionInput::TYPE_OPTION_NAME === $completionInput->getCompletionType()) {
$this->log(' Completing option names for the <comment>'.($command instanceof LazyCommand ? $command->getCommand() : $command)::class.'</> command.');