summaryrefslogtreecommitdiff
path: root/shell/bin/help.php
diff options
context:
space:
mode:
Diffstat (limited to 'shell/bin/help.php')
-rw-r--r--shell/bin/help.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/shell/bin/help.php b/shell/bin/help.php
index 95d2641..186c7ea 100644
--- a/shell/bin/help.php
+++ b/shell/bin/help.php
@@ -1,12 +1,14 @@
<?php
-function main($args, $env) {
- $commands = array();
- foreach (explode(';',$env['PATH']) as $dir) {
- $commands = array_merge($commands,glob($dir.'/*.php'));
+class p_help extends prog {
+ public static function main($args, $env) {
+ $commands = array();
+ foreach (explode(';',$env['PATH']) as $dir) {
+ $commands = array_merge($commands,glob($dir.'/*.php'));
+ }
+ foreach ($commands as $command) {
+ echo preg_replace('@.*/([^/]*)\.php$@',"\$1\n",$command);
+ }
+ return 0;
}
- foreach ($commands as $command) {
- echo preg_replace('@.*/([^/]*)\.php$@',"\$1\n",$command);
- }
- return 0;
}