]> granicus.if.org Git - php/commitdiff
* POSIX getopt compatibility support (first argv element is the command)
authorStig Bakken <ssb@php.net>
Sun, 26 May 2002 12:13:47 +0000 (12:13 +0000)
committerStig Bakken <ssb@php.net>
Sun, 26 May 2002 12:13:47 +0000 (12:13 +0000)
pear/Console/Getopt.php
pear/package-Console_Getopt.xml

index c82aabba348ce8c7f1793d8c0139e525be0a0ba6..834ab8c5041553947a22b5a98d76591629fbda97 100644 (file)
@@ -77,6 +77,9 @@ class Console_Getopt {
         if ($long_options)
             sort($long_options);
 
+        if ($args[0]{0} != '-') {
+            array_shift($args);
+        }
         reset($args);
         while (list($i, $arg) = each($args)) {
 
index c0ffb9f196786ebe8709a4e3a216f355fe416982..067893e3a4f53abb889ff56adb80bbaa470b4ddf 100644 (file)
@@ -17,15 +17,17 @@ short and long options.</description>
     </maintainer>
     <maintainer>
       <user>ssb</user>
-      <role>helper</role>
+      <role>developer</role>
       <name>Stig Bakken</name>
       <email>stig@php.net</email>
     </maintainer>
   </maintainers>
   <release>
-    <version>0.10</version>
-    <date>2002-05-12</date>
-    <notes>Packaging fix</notes>
+    <version>0.11</version>
+    <date>2002-05-26</date>
+    <notes>POSIX getopt compatibility fix: treat first element of args
+array as command name
+</notes>
     <state>beta</state>
     <filelist>
      <dir name="Console">
@@ -34,6 +36,12 @@ short and long options.</description>
     </filelist>
   </release>
   <changelog>
+    <release>
+      <version>0.10</version>
+      <date>2002-05-12</date>
+      <notes>Packaging fix</notes>
+      <state>beta</state>
+    </release>
     <release>
       <version>0.9</version>
       <date>2002-05-12</date>