HTML/FlexyFramework/Cli.php
authorAlan Knowles <alan@roojs.com>
Thu, 25 Oct 2018 03:41:41 +0000 (11:41 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 25 Oct 2018 03:41:41 +0000 (11:41 +0800)
HTML/FlexyFramework/Cli.php

index d2e3654..8bf96c6 100644 (file)
@@ -321,6 +321,11 @@ Available commands:
             }
             if ($newargs->getCode() === CONSOLE_GETARGS_HELP) {
                 if (!$has_class) {
+                    list($optional, $required, $params) = Console_Getargs::getOptionalRequired($val);
+        
+                    $helpHeader = 'Usage: php ' . implode (' ', $call) . ' '. 
+                    $optional . ' ' . $required . ' ' . $params . "\n\n";           
+       
                     echo Console_Getargs::getHelp($val,
                             $helpHeader, NULL, 78, 4)."\n\n";
                     exit;