Debian Codegraph @

vendor/symfony/console/Resources/completion.fish

raw
1 # This file is part of the Symfony package.
2 #
3 # (c) Fabien Potencier <[email protected]>
4 #
5 # For the full copyright and license information, please view
6 # https://symfony.com/doc/current/contributing/code/license.html
7
8 function _sf_{{ COMMAND_NAME }}
9 set sf_cmd (commandline -o)
10 set c (count (commandline -oc))
11
12 set completecmd "$sf_cmd[1]" "_complete" "--no-interaction" "-sfish" "-a{{ VERSION }}"
13
14 for i in $sf_cmd
15 if [ $i != "" ]
16 set completecmd $completecmd "-i$i"
17 end
18 end
19
20 set completecmd $completecmd "-c$c"
21
22 set sfcomplete (env SHELL_VERBOSITY=0 $completecmd)
23
24 for i in $sfcomplete
25 echo $i
26 end
27 end
28
29 complete -c '{{ COMMAND_NAME }}' -a '(_sf_{{ COMMAND_NAME }})' -f