diff options
author | David Flatz | 2023-02-20 11:53:16 +0100 |
---|---|---|
committer | David Flatz | 2023-02-20 11:53:16 +0100 |
commit | ee42bc77965e4e4fbbea558b092e07623206c1c8 (patch) | |
tree | bf72d830e59366cd1a7a47472e1d3af1da827729 /it.class | |
parent | 5d5137be29cba9352226ab0781e72b5c20de89b9 (diff) | |
download | itools-ee42bc77965e4e4fbbea558b092e07623206c1c8.tar.gz itools-ee42bc77965e4e4fbbea558b092e07623206c1c8.tar.bz2 itools-ee42bc77965e4e4fbbea558b092e07623206c1c8.zip |
only look at first two elements for description of short- and longoption so that later occurrences of - after comma don't overwrite them
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -902,7 +902,7 @@ static function getopt($usage, $p = array()) foreach(explode("\n", trim($usage)) as $usageline) { $shortoptname = $shortoptarg = $longoptname = $longoptarg = ""; - foreach (explode(',', $usageline) as $optdesc) + foreach (explode(',', $usageline, 2) as $optdesc) { $optdesc = trim($optdesc); if ($matches = (array)it::match('^--(\w[\w-]*)(=[A-Z])?', $optdesc)) |