protected function configureCompletion(CompletionHandler $handler) { // Completion for plugin argument/option to file system paths. $handler->addHandler(new ShellPathCompletion(Completion::ALL_COMMANDS, 'plugin', Completion::ALL_TYPES)); // Completion for moodle option to file system paths. $handler->addHandler(new ShellPathCompletion(Completion::ALL_COMMANDS, 'moodle', Completion::TYPE_OPTION)); }
/** * Configure the CompletionHandler instance before it is run * * @param CompletionHandler $handler Completion handler. * * @return void */ protected function configureCompletion(CompletionHandler $handler) { $handler->addHandler(new ShellPathCompletion(CompletionInterface::ALL_COMMANDS, 'path', Completion::TYPE_ARGUMENT)); $handler->addHandler(new ShellPathCompletion('aggregate', 'ignore-add', Completion::TYPE_OPTION)); $handler->addHandler(new ShellPathCompletion('aggregate', 'ignore-remove', Completion::TYPE_OPTION)); }
/** * Run the completion handler and return a filtered list of results * * @deprecated - This will be removed in 1.0.0 in favour of CompletionCommand::configureCompletion * * @return string[] */ protected function runCompletion() { $this->configureCompletion($this->handler); return $this->handler->runCompletion(); }
/** * Configure the CompletionHandler instance before it is run * * @param CompletionHandler $handler Completion handler. * * @return void */ protected function configureCompletion(CompletionHandler $handler) { $handler->addHandler(new ShellPathCompletion('report:create', 'project-path', Completion::TYPE_ARGUMENT)); }