blob: 95d264183c231f21e1b8ce320ca3bb5b7e342772 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}
|