src/Console/Controllers/HelpController.php
public function actionListActionOptions(RequestApplicationInterface $app, $action)
    {
        $result = $this->createController($action);

        if ($result === false || !($result[0] instanceof Controller)) {
            return;
        }

        /** @var Controller $controller */
        list($controller, $actionId) = $result;
        if (!$controller->hasAction($actionId)) {
            return;
        }

        foreach ($controller->getActionArgsHelp($actionId) as $argument => $help) {
            $description = str_replace("\n", '', addcslashes($help['comment'], ':')) ?: $argument;
            $this->stdout($argument . ':' . $description . "\n");
        }

        $this->stdout("\n");
        foreach ($controller->getActionOptionsHelp($actionId) as $argument => $help) {
            $description = str_replace("\n", '', addcslashes($help['comment'], ':'));
            $this->stdout('--' . $argument . ($description ? ':' . $description : '') . "\n");
        }
    }
public function actionListActionOptions(RequestApplicationInterface $app, $action)
    {
        $result = $this->createController($action);

        if ($result === false || !($result[0] instanceof Controller)) {
            return;
        }

        /** @var Controller $controller */
        list($controller, $actionId) = $result;
        if (!$controller->hasAction($actionId)) {
            return;
        }

        foreach ($controller->getActionArgsHelp($actionId) as $argument => $help) {
            $description = str_replace("\n", '', addcslashes($help['comment'], ':')) ?: $argument;
            $this->stdout($argument . ':' . $description . "\n");
        }

        $this->stdout("\n");
        foreach ($controller->getActionOptionsHelp($actionId) as $argument => $help) {
            $description = str_replace("\n", '', addcslashes($help['comment'], ':'));
            $this->stdout('--' . $argument . ($description ? ':' . $description : '') . "\n");
        }
    }
List all available options for the $action in machine readable format.
This is used for shell completion.

@param RequestApplicationInterface $app
@param string                      $action route to action