From 5fcc8115d2571fd09820c392828ae95c830528ca Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 31 Jul 2025 11:40:36 -0400 Subject: [PATCH 1/3] feat(occ): add default help text with docs link to all commands Signed-off-by: Josh --- core/Command/Base.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/Command/Base.php b/core/Command/Base.php index 6ab2765b0f93e..1ad84111b3a10 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -24,9 +24,11 @@ class Base extends Command implements CompletionAwareInterface { protected string $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN; private bool $php_pcntl_signal = false; private bool $interrupted = false; + public string $defaultHelp = 'More extensive and thorough documentation may be found at https://docs.nextcloud.com' . PHP_EOL; // TODO: link to appropriately versioned/themed Admin Manual protected function configure() { $this + ->setHelp($this->defaultHelp) ->addOption( 'output', null, From b4027c557d4c711120468e7e4e4d6cc2c48dab80 Mon Sep 17 00:00:00 2001 From: Josh Date: Sat, 30 Aug 2025 09:22:15 -0400 Subject: [PATCH 2/3] fix: add retrieval of customized base doc URL Signed-off-by: Josh --- core/Command/Base.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Command/Base.php b/core/Command/Base.php index 1ad84111b3a10..7c5e6f6d66fcb 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -24,9 +24,10 @@ class Base extends Command implements CompletionAwareInterface { protected string $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN; private bool $php_pcntl_signal = false; private bool $interrupted = false; - public string $defaultHelp = 'More extensive and thorough documentation may be found at https://docs.nextcloud.com' . PHP_EOL; // TODO: link to appropriately versioned/themed Admin Manual protected function configure() { + // Some of our commands do not extend this class; and some of those that do do not call parent::configure() + $defaultHelp = 'More extensive and thorough documentation may be found at ' . \OCP\Server::get(\OCP\Defaults::class)->getDocBaseUrl() . PHP_EOL; $this ->setHelp($this->defaultHelp) ->addOption( From 2fa55ce1346f53872d1eb8bd3d407de29065e699 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 2 Sep 2025 16:33:30 -0400 Subject: [PATCH 3/3] fix: review input Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Josh --- core/Command/Base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Command/Base.php b/core/Command/Base.php index 7c5e6f6d66fcb..8f94c1d473aba 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -29,7 +29,7 @@ protected function configure() { // Some of our commands do not extend this class; and some of those that do do not call parent::configure() $defaultHelp = 'More extensive and thorough documentation may be found at ' . \OCP\Server::get(\OCP\Defaults::class)->getDocBaseUrl() . PHP_EOL; $this - ->setHelp($this->defaultHelp) + ->setHelp($defaultHelp) ->addOption( 'output', null,