diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-21 00:48:05 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-09-29 15:57:10 +0200 |
commit | e1df6b5702224bbbdc4ed555ecc90620ba9b0e40 (patch) | |
tree | 74fa899ba41a019ac77be73ec11e37bb3ea9bf0c /core/Command/App/GetPath.php | |
parent | 5551c6311025e432525a75ecda4d99fbeec913a6 (diff) | |
download | nextcloud-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.php | 13 |
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 []; + } } |