diff options
-rw-r--r-- | it.class | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -661,13 +661,17 @@ static function getopt($helplines) foreach (array_slice($_SERVER['argv'], 1) as $arg) { - if ($eat) + if ($noopts) + $result['args'][] = $arg; + else if ($eat) { if (it::match('^--?\w', $arg)) # Already next option => Missing argument? $err = true; else $result[array_shift($eat)] = $arg; } + else if ($arg == "--") + $noopts = true; elseif ($matches = (array)it::match('^--(\w[\w-]*)(=.*)?', $arg)) { list($optname, $val) = $matches; |