Re 2: misc bb_getopt_ulflags() questions

Mike Frysinger vapier at gentoo.org
Tue Feb 21 00:50:36 UTC 2006


On Monday 20 February 2006 19:15, Tito wrote:
> On Monday 20 February 2006 23:53, Mike Frysinger wrote:
> > finally, and the reason i'm actually writing this e-mail, is there a way
> > to get bb_getopt_ulflags() to stop processing as soon as it encounters a
> > non-option ?  i want to support this syntax:
> > applet [applet options] program_to_exec [program options]
> > because forcing the user to add a "--" before program_to_exec is wrong
>
> The only way to do this with bb_getopt_ulflags  probably is:
>
> applet -abc -d opt "program_to_exec -efg arg"
>
> as in:
>
>  ./busybox strings -af "busybox strings -af busybox"
> strings: busybox strings -af busybox: No such file or directory
>
> in this case the stuff between " " is not parsed by getopt_ulflags
>
> but this is an ugly hack.

right, neither solution is acceptable :/

wonder how hard it'd be to add like '!!' support to the beginning of 
bb_opt_complementally ... meaning, stop processing options as soon as a 
non-option is found ...
-mike



More information about the busybox mailing list