/** * Sets up the default autocomplete command * * Creates the route, and maps the command. * * @param RouteCollection $routeCollection * @param Dispatcher $dispatcher */ protected function setupAutocompleteCommand(RouteCollection $routeCollection, Dispatcher $dispatcher) { $routeCollection->addRouteSpec(['name' => 'autocomplete', 'description' => 'Shows how to activate autocompletion of this command for your login shell', 'short_description' => 'Command autocompletion setup']); $dispatcher->map('autocomplete', function ($route, $console) { ob_start(); include __DIR__ . '/../views/autocomplete.phtml'; $content = ob_get_contents(); ob_end_clean(); return $console->write($content); }); }