diff options
Diffstat (limited to 'core/Command/Db/Migrations/StatusCommand.php')
-rw-r--r-- | core/Command/Db/Migrations/StatusCommand.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/core/Command/Db/Migrations/StatusCommand.php b/core/Command/Db/Migrations/StatusCommand.php index 9fa497a126f..1e5f102cea7 100644 --- a/core/Command/Db/Migrations/StatusCommand.php +++ b/core/Command/Db/Migrations/StatusCommand.php @@ -25,12 +25,14 @@ namespace OC\Core\Command\Db\Migrations; use OC\DB\MigrationService; use OC\Migration\ConsoleOutput; use OCP\IDBConnection; +use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionAwareInterface; +use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class StatusCommand extends Command { +class StatusCommand extends Command implements CompletionAwareInterface { /** @var IDBConnection */ private $connection; @@ -61,6 +63,28 @@ class StatusCommand extends Command { } /** + * @param string $optionName + * @param CompletionContext $context + * @return string[] + */ + public function completeOptionValues($optionName, CompletionContext $context) { + return []; + } + + /** + * @param string $argumentName + * @param CompletionContext $context + * @return string[] + */ + public function completeArgumentValues($argumentName, CompletionContext $context) { + if ($argumentName === 'app') { + $allApps = \OC_App::getAllApps(); + return array_diff($allApps, \OC_App::getEnabledApps(true, true)); + } + return []; + } + + /** * @param MigrationService $ms * @return array associative array of human readable info name as key and the actual information as value */ |