The command:

        getopt -o '' -l 'noo,aa,foo::' -- --foo ss -- bling

Gives back:

         --foo '' -- 'ss' 'bling'

This is the correct output. As per the manpage:

        If the option has an optional argument, it must be written directly
        after the long option name, separated by `=', if present 

So you would have to use:

        getopt -o '' -l 'noo,aa,foo::' -- --foo=ss -- bling

To get:

         --foo 'ss' -- 'bling'

Note that this part of the parsing is actually done by getopt(3).

Regards,
  Frodo (the author of getopt(3))

-- 
Frodo Looijaard <fr...@frodo.looijaard.name> (See http://frodo.looijaard.name/)
Defenestration n. (formal or joc.):
  The act of removing Windows from your computer in disgust, usually followed
  by the installation of Linux or some other Unix-like operating system.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to