]> granicus.if.org Git - php/commitdiff
- Add help-list command
authorMarcus Boerger <helly@php.net>
Tue, 15 May 2007 16:39:01 +0000 (16:39 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 15 May 2007 16:39:01 +0000 (16:39 +0000)
ext/phar/phar/clicommand.inc

index 2183486a726bd344d84a84a4eec99ff386c2978e..8872bea4746f11292f72ed33f62a8aae9d5c5c8c 100755 (executable)
@@ -380,6 +380,22 @@ abstract class CLICommand
                }
                exit(0);
        }
+
+       static function cli_cmd_inf_help_list()
+       {
+               return "Lists available commands.";
+       }
+
+       function cli_cmd_run_help_list()
+       {
+               ksort($this->cmds);
+               $lst = '';
+               foreach($this->cmds as $name => $funcs)
+               {
+                       $lst .= $name . ' ';
+               }
+               echo substr($lst, 0, -1) . "\n";
+       }
 }
 
 ?>
\ No newline at end of file