8000 Zsh shell autocompletions by adhocore · Pull Request #43970 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Zsh shell autocompletions #43970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
For zsh shell, add command description as well
  • Loading branch information
adhocore committed Nov 9, 2021
commit fc7f870a46c2d40da2579025383be3dfa1c47b06
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti
CompletionInput::TYPE_ARGUMENT_VALUE === $input->getCompletionType()
&& 'command' === $input->getCompletionName()
) {
$suggestions->suggestValues(array_filter(array_map(function (Command $command) {
return $command->isHidden() ? null : $command->getName();
$suggestions->suggestValues(array_filter(array_map(function (Command $command) use ($input) {
return $command->isHidden() ? null : $command->getName() . ($input->isShell('zsh') ? "\t".$command->getDescription() : '');
}, $this->all())));

return;
Expand Down
0