summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class6
1 files changed, 5 insertions, 1 deletions
diff --git a/it.class b/it.class
index 407e200..d2ac013 100644
--- a/it.class
+++ b/it.class
@@ -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;