summaryrefslogtreecommitdiffstats
path: root/core/Command/Config/System/SetConfig.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-21 14:03:09 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-09-29 15:57:10 +0200
commit691a5d40a4420c15a23db0f49f67a7fb1ecf7738 (patch)
treec29a44406a3cffc03750da5703ec5febb91790e5 /core/Command/Config/System/SetConfig.php
parente1df6b5702224bbbdc4ed555ecc90620ba9b0e40 (diff)
downloadnextcloud-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.php13
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);
+ }
}