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.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/bin/help.php b/shell/bin/help.php
new file mode 100644
index 0000000..95d2641
--- /dev/null
+++ b/shell/bin/help.php
@@ -0,0 +1,12 @@
+<?php
+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;
+}
+