summaryrefslogtreecommitdiffstats
path: root/core/Command/App/GetPath.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-21 00:48:05 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-09-29 15:57:10 +0200
commite1df6b5702224bbbdc4ed555ecc90620ba9b0e40 (patch)
tree74fa899ba41a019ac77be73ec11e37bb3ea9bf0c /core/Command/App/GetPath.php
parent5551c6311025e432525a75ecda4d99fbeec913a6 (diff)
downloadnextcloud-server-e1df6b5702224bbbdc4ed555ecc90620ba9b0e40.tar.gz
nextcloud-server-e1df6b5702224bbbdc4ed555ecc90620ba9b0e40.zip
Full support for autocomplete of app:*
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command/App/GetPath.php')
-rw-r--r--core/Command/App/GetPath.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/Command/App/GetPath.php b/core/Command/App/GetPath.php
index 3eeee5c2c44..33a812c674e 100644
--- a/core/Command/App/GetPath.php
+++ b/core/Command/App/GetPath.php
@@ -23,6 +23,7 @@
namespace OC\Core\Command\App;
use OC\Core\Command\Base;
+use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -60,4 +61,16 @@ class GetPath extends Base {
// App not found, exit with non-zero
return 1;
}
+
+ /**
+ * @param string $argumentName
+ * @param CompletionContext $context
+ * @return string[]
+ */
+ public function completeArgumentValues($argumentName, CompletionContext $context) {
+ if ($argumentName === 'app') {
+ return \OC_App::getAllApps();
+ }
+ return [];
+ }
}