From fd6f7bf74ae50ff95c754298a9f9cdc22f2fe2fc Mon Sep 17 00:00:00 2001 From: Brent Roose Date: Thu, 30 May 2024 11:58:47 +0200 Subject: [PATCH] WIP --- src/Actions/CompleteConsoleCommandNames.php | 4 ++++ src/{completion.sh => complete.zsh} | 2 ++ 2 files changed, 6 insertions(+) rename src/{completion.sh => complete.zsh} (97%) diff --git a/src/Actions/CompleteConsoleCommandNames.php b/src/Actions/CompleteConsoleCommandNames.php index 399db3e..de0016e 100644 --- a/src/Actions/CompleteConsoleCommandNames.php +++ b/src/Actions/CompleteConsoleCommandNames.php @@ -21,6 +21,10 @@ public function complete(ConsoleArgumentBag $argumentBag, int $current): array $completions = []; foreach ($this->consoleConfig->commands as $name => $definition) { + if ($definition->hidden) { + continue; + } + if (! str_starts_with($name, $currentCommandName)) { continue; } diff --git a/src/completion.sh b/src/complete.zsh similarity index 97% rename from src/completion.sh rename to src/complete.zsh index 2046895..92ff620 100644 --- a/src/completion.sh +++ b/src/complete.zsh @@ -1,3 +1,5 @@ +# Forked from https://github.com/symfony/console/tree/7.0/Resources + #compdef tempest # This file is part of the Symfony package.