blob: 186c7eaa0c118af0cb3d2fae4ce29413aa51eefe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<?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;
}
}
|