subcommands with program_options (like svn command)
Hello all, I am writing a moderately complex command-line application, and I have been looking at program_options for simplifying my life. The best way to describe what I want to do, is in term of the svn command (which I assume most people are familiar with). In particular, what I want to do is expose a number of subcommands for controlling the application, each of which has their own particular options. For example, if I were to write svn using program_options, then the first command I have to accept could be one of: add, checkout, del, log, etc. Each of these commands has a separate list of arguments that they accept themselves. I'm a bit stumped on how exactly to do this with program_options, because the first argument (which I can do using positional arguments) decides what other arguments are valid. Any thoughts or suggestions? Thanks! AJ
participants (1)
-
Adrien Guillon