From 1aa027c2f69cbb6b75ac14f0d1437b482989f905 Mon Sep 17 00:00:00 2001 From: Stephan Huber Date: Tue, 5 Nov 2024 17:37:55 +0100 Subject: [PATCH] fix: autocompletion for fish --- src/Command/CompletionCommand.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Command/CompletionCommand.php b/src/Command/CompletionCommand.php index fdbe9347..08d326f5 100644 --- a/src/Command/CompletionCommand.php +++ b/src/Command/CompletionCommand.php @@ -74,12 +74,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int $shell_type = $input->getOption('shell-type') ?: $this->getShellType(); if ($input->getOption('generate-hook')) { - if ($shell_type == 'fish') { - return $this->handleFishShellCompletions($output); + if ($shell_type === 'fish') { + $this->handleFishShellCompletions($output); + return 0; } } - if ($shell_type == 'fish') { + if ($shell_type === 'fish') { $command_line = $input->getOption('command-line'); $option = $input->getOption('complete-option'); $command_name =$input->getOption('complete-command');