diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-21 14:03:09 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-09-29 15:57:10 +0200 |
commit | 691a5d40a4420c15a23db0f49f67a7fb1ecf7738 (patch) | |
tree | c29a44406a3cffc03750da5703ec5febb91790e5 /core/Command/Config/System/SetConfig.php | |
parent | e1df6b5702224bbbdc4ed555ecc90620ba9b0e40 (diff) | |
download | nextcloud-server-691a5d40a4420c15a23db0f49f67a7fb1ecf7738.tar.gz nextcloud-server-691a5d40a4420c15a23db0f49f67a7fb1ecf7738.zip |
Add autocomplete for config:*
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command/Config/System/SetConfig.php')
-rw-r--r-- | core/Command/Config/System/SetConfig.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/Command/Config/System/SetConfig.php b/core/Command/Config/System/SetConfig.php index fcbf3c0baa5..992fca8d084 100644 --- a/core/Command/Config/System/SetConfig.php +++ b/core/Command/Config/System/SetConfig.php @@ -23,8 +23,8 @@ namespace OC\Core\Command\Config\System; -use OC\Core\Command\Base; use OC\SystemConfig; +use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -196,4 +196,15 @@ class SetConfig extends Base { return $existingValues; } + /** + * @param string $optionName + * @param CompletionContext $context + * @return string[] + */ + public function completeOptionValues($optionName, CompletionContext $context) { + if ($optionName === 'type') { + return ['string', 'integer', 'double', 'boolean']; + } + return parent::completeOptionValues($optionName, $context); + } } |