diff --git a/core/Command/Base.php b/core/Command/Base.php
index 1a78e3b4062e4267ada853debfa9c4af69f5fd87..15878a807d84600d58a2e436c28775c8efbe4169 100644
--- a/core/Command/Base.php
+++ b/core/Command/Base.php
@@ -167,6 +167,9 @@ class Base extends Command implements CompletionAwareInterface {
 	 * @return string[]
 	 */
 	public function completeOptionValues($optionName, CompletionContext $context) {
+		if ($optionName === 'output') {
+			return ['plain', 'json', 'json_pretty'];
+		}
 		return [];
 	}
 
diff --git a/core/Command/Config/App/Base.php b/core/Command/Config/App/Base.php
new file mode 100644
index 0000000000000000000000000000000000000000..3f29591dd15667d51c23ee10b2032315c9751037
--- /dev/null
+++ b/core/Command/Config/App/Base.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Core\Command\Config\App;
+
+use OCP\IConfig;
+use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
+
+abstract class Base extends \OC\Core\Command\Base {
+
+	/** * @var IConfig */
+	protected $config;
+
+	/**
+	 * @param string $argumentName
+	 * @param CompletionContext $context
+	 * @return string[]
+	 */
+	public function completeArgumentValues($argumentName, CompletionContext $context) {
+		if ($argumentName === 'app') {
+			return \OC_App::getAllApps();
+		}
+
+		if ($argumentName === 'name') {
+			$appName = $context->getWordAtIndex($context->getWordIndex() - 1);
+			return $this->config->getAppKeys($appName);
+		}
+		return [];
+	}
+}
diff --git a/core/Command/Config/App/DeleteConfig.php b/core/Command/Config/App/DeleteConfig.php
index 82099556ca132ee91f21febf1c21bbfed9ff970c..9cb28c9774c7645c409414a6e5e574e189438624 100644
--- a/core/Command/Config/App/DeleteConfig.php
+++ b/core/Command/Config/App/DeleteConfig.php
@@ -22,7 +22,6 @@
 
 namespace OC\Core\Command\Config\App;
 
-use OC\Core\Command\Base;
 use OCP\IConfig;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
diff --git a/core/Command/Config/App/GetConfig.php b/core/Command/Config/App/GetConfig.php
index eb81b1b19b0de3660ad5efe95b4df96a5365e3ea..fe365c2546da1f51fe92b9a83cae6145a8d483ff 100644
--- a/core/Command/Config/App/GetConfig.php
+++ b/core/Command/Config/App/GetConfig.php
@@ -22,7 +22,6 @@
 
 namespace OC\Core\Command\Config\App;
 
-use OC\Core\Command\Base;
 use OCP\IConfig;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
diff --git a/core/Command/Config/App/SetConfig.php b/core/Command/Config/App/SetConfig.php
index aa84ddf1d8e83a069dd9c3e59acf196d788e0113..e7f5c8ac61b8a5ddc15842fa37ef0beb7eabd93a 100644
--- a/core/Command/Config/App/SetConfig.php
+++ b/core/Command/Config/App/SetConfig.php
@@ -22,7 +22,6 @@
 
 namespace OC\Core\Command\Config\App;
 
-use OC\Core\Command\Base;
 use OCP\IConfig;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
diff --git a/core/Command/Config/Import.php b/core/Command/Config/Import.php
index a27d1b62f0bac0af001a0ad1cdd492e64cfa615e..15517f860a5e97abf9b5f126d2d2028bc1da8c56 100644
--- a/core/Command/Config/Import.php
+++ b/core/Command/Config/Import.php
@@ -23,12 +23,16 @@
 namespace OC\Core\Command\Config;
 
 use OCP\IConfig;
+use Stecman\Component\Symfony\Console\BashCompletion\Completion;
+use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionAwareInterface;
+use Stecman\Component\Symfony\Console\BashCompletion\Completion\ShellPathCompletion;
+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 Import extends Command {
+class Import extends Command implements CompletionAwareInterface  {
 	protected $validRootKeys = ['system', 'apps'];
 
 	/** @var IConfig */
@@ -193,4 +197,30 @@ class Import extends Command {
 			}
 		}
 	}
+
+	/**
+	 * @param string $optionName
+	 * @param CompletionContext $context
+	 * @return string[]|false
+	 */
+	public function completeOptionValues($optionName, CompletionContext $context) {
+		return [];
+	}
+
+	/**
+	 * @param string $argumentName
+	 * @param CompletionContext $context
+	 * @return string[]
+	 */
+	public function completeArgumentValues($argumentName, CompletionContext $context) {
+		if ($argumentName === 'file') {
+			$helper = new ShellPathCompletion(
+				$this->getName(),
+				'file',
+				Completion::TYPE_ARGUMENT
+			);
+			return $helper->run();
+		}
+		return [];
+	}
 }
diff --git a/core/Command/Config/ListConfigs.php b/core/Command/Config/ListConfigs.php
index e11eec1a7a19813de83d7a951ca40fd31ad6430c..2737bc2cea4fe0a83cf4f00197a9d274134eaa84 100644
--- a/core/Command/Config/ListConfigs.php
+++ b/core/Command/Config/ListConfigs.php
@@ -25,6 +25,7 @@ namespace OC\Core\Command\Config;
 use OC\Core\Command\Base;
 use OC\SystemConfig;
 use OCP\IAppConfig;
+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;
@@ -127,4 +128,16 @@ class ListConfigs extends Base {
 
 		return $configs;
 	}
+
+	/**
+	 * @param string $argumentName
+	 * @param CompletionContext $context
+	 * @return string[]
+	 */
+	public function completeArgumentValues($argumentName, CompletionContext $context) {
+		if ($argumentName === 'app') {
+			return array_merge(['all', 'system'], \OC_App::getAllApps());
+		}
+		return [];
+	}
 }
diff --git a/core/Command/Config/System/Base.php b/core/Command/Config/System/Base.php
new file mode 100644
index 0000000000000000000000000000000000000000..4e49baf5ab23362252ca2a282e795abf555583aa
--- /dev/null
+++ b/core/Command/Config/System/Base.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Core\Command\Config\System;
+
+use OC\SystemConfig;
+use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
+
+abstract class Base extends \OC\Core\Command\Base {
+
+	/** @var SystemConfig */
+	protected $systemConfig;
+
+	/**
+	 * @param string $argumentName
+	 * @param CompletionContext $context
+	 * @return string[]
+	 */
+	public function completeArgumentValues($argumentName, CompletionContext $context) {
+		if ($argumentName === 'name') {
+			$words = $this->getPreviousNames($context, $context->getWordIndex());
+			if (empty($words)) {
+				$completions = $this->systemConfig->getKeys();
+			} else {
+				$key = array_shift($words);
+				$value = $this->systemConfig->getValue($key);
+				$completions = array_keys($value);
+
+				while (!empty($words) && is_array($value)) {
+					$key = array_shift($words);
+					if (!isset($value[$key]) || !is_array($value[$key])) {
+						break;
+					}
+
+					$value = $value[$key];
+					$completions = array_keys($value);
+				}
+			}
+
+			return $completions;
+		}
+		return parent::completeArgumentValues($argumentName, $context);
+	}
+
+	/**
+	 * @param CompletionContext $context
+	 * @param int $currentIndex
+	 * @return string[]
+	 */
+	protected function getPreviousNames(CompletionContext $context, $currentIndex) {
+		$word = $context->getWordAtIndex($currentIndex - 1);
+		if ($word === $this->getName() || $currentIndex <= 0) {
+			return [];
+		}
+
+		$words = $this->getPreviousNames($context, $currentIndex - 1);
+		$words[] = $word;
+		return $words;
+	}
+}
diff --git a/core/Command/Config/System/DeleteConfig.php b/core/Command/Config/System/DeleteConfig.php
index 65f26f7b2a82993db5fc79d4579c00e9f294fe0b..216cf4eb6401e4fc5853bc342cf51497e3f33e43 100644
--- a/core/Command/Config/System/DeleteConfig.php
+++ b/core/Command/Config/System/DeleteConfig.php
@@ -22,7 +22,6 @@
 
 namespace OC\Core\Command\Config\System;
 
-use OC\Core\Command\Base;
 use OC\SystemConfig;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
diff --git a/core/Command/Config/System/GetConfig.php b/core/Command/Config/System/GetConfig.php
index 7c2f663e42c326c59f19fa96f1c7b75380c41f2a..11ead7456ccb69de916584731433469cc7369cb3 100644
--- a/core/Command/Config/System/GetConfig.php
+++ b/core/Command/Config/System/GetConfig.php
@@ -22,7 +22,6 @@
 
 namespace OC\Core\Command\Config\System;
 
-use OC\Core\Command\Base;
 use OC\SystemConfig;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
diff --git a/core/Command/Config/System/SetConfig.php b/core/Command/Config/System/SetConfig.php
index fcbf3c0baa53489661f903df5a66421e03af902e..992fca8d084c24ad222766735b647f58eb928a03 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);
+	}
 }