On Fri, Oct 8, 2010 at 06:19,
I have an application, which spawns off other applications. As input, it takes in environment variables and arguments to pass to the resultant application. For instance:
So. Something funny comes along when I try to pass “-e” as an argument. So, in the above would be: mutate -a “-e” –a “foo” xterm The program options parser attempts to parse the “-e”, and says “I don’t know what it is”.
Oh, I see. The point was that you don't want -e to be parsed, but stored by program_options. Could it be as simple as double quoting it (""-e"") so that only the outer pair of quotes gets stripped by the command line, leaving the inner pair and thus program_options not picking up the option as a command (I hope it actually behaves like that). Alternatively, it seems it might be better that you write your own very simple command option parser that does what you need (e.g. read everything after -a or -E until the other appears), instead of rebuilding significant parts of program_options. Best, Dee