misc bb_getopt_ulflags() questions
Mike Frysinger
vapier at gentoo.org
Mon Feb 20 22:53:12 UTC 2006
i'm struggling with the "english" in the comments in getopt_ulflags.c ... for
example, this bit:
"--" A double dash as the first char in a bb_opt_complementally group
means make first argv[1] as option always as may be added -, special
for "ar" and "tar" applets.
does that mean if i use "--" at the beginning of bb_opt_complementally, then
argv[1] will be parsed as options even if it doesnt start with a - ? the
idea being we want to support this syntax:
tar xvf foo.tar
instead of forcing this syntax:
tar -xvf foo.tar
next up, what does "complementally" mean ? is that a misspelling and the
variable should really be called "bb_opt_complementary" ?
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
-mike
More information about the busybox
mailing list