Skip to content

Commit

Permalink
Simplify Fish completion script
Browse files Browse the repository at this point in the history
The output of the complete command can be used as is, there is no need
to store its result in a variable and echo each line separately.
  • Loading branch information
adriaanzon committed Feb 17, 2024
1 parent 7b4818f commit 20428e1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Symfony/Component/Console/Resources/completion.fish
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ function _sf_{{ COMMAND_NAME }}

set completecmd $completecmd "-c$c"

set sfcomplete ($completecmd)

for i in $sfcomplete
echo $i
end
$completecmd
end

complete -c '{{ COMMAND_NAME }}' -a '(_sf_{{ COMMAND_NAME }})' -f

0 comments on commit 20428e1

Please sign in to comment.