5 ms·
Symfony 5.4 just added support for bash completion to PHP CLI commands using the library so we were able to add a very nice and easy to use interface to Winter
by theluketowers 5y ago
Symfony 5.4 just added support for bash completion to PHP CLI commands using the library so we were able to add a very nice and easy to use interface to Winter CMS to take advantage of it: https://wintercms.com/blog/post/console-improvements-winter-12 https://wintercms.com/blog/post/console-improvements-winter-...
Defining completion values for a given argument in a Winter CMS CLI command is as easy as adding a single method to the command's class now:
public function suggestMyArgumentValues(string $currentValue, array $allInput): array
{
return ['array', 'of', 'suggested', 'values'];
}