Bug#620306: getopt: Optional argument parsing buggy

2012-07-14 Thread Frodo Looijaard
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

Bug#620306: getopt: Optional argument parsing buggy

2011-03-31 Thread Jan-Benedict Glaw
Package: util-linux Version: 2.17.2-9.1 Hi! I've just played a bit with `getopt' and get unexpected output whith optional arguments: jbglaw@jblaptop:~$ getopt -o '' -l 'noo,aa,foo' -- --foo ss -- bling --foo -- 'ss' 'bling' jbglaw@jblaptop:~$ getopt -o '' -l 'noo,aa,foo:' -- --foo ss -- bling