
Caleb Epstein wrote:
Finally, the new functionality might not work nice with long options that start with a single dash (allow_long_disguise style option):
-foo
will be considered as short option '-f' with value 'oo', and never as long option 'foo'.
Would this only be if "f" is a registered option, or even if it is unregistered? I'd think in the unregistered case you'd end up with -f and two -o's as in the -cd case above.
In the -cd case above we don't have a third letter and '-c' is registered. For -foo case where '-f' is not registered we can treat it either as (-f, "oo") or as (-f,) (-o,) (-o,) I still prefer the first variant, because in this case, if some later code knows -f, it will get the value without problems. If we split -foo into three options without even knowing what's -f, it might be problematic to get (-f, "oo") later.
Whichever the case, I agree that -foo should not be treated the same way as --foo. But I grew up using GNU tools, so I'm biased towards the double-dash syntax.
Yea, me too.
Overall I think this is great. It makes it straightforward to chain option processing across different modules.
I think different modules scenario should be supported already. Each module can provide its own options_description, which can be then combined into a single options_description object used for parsing. Every module can then use the 'variables_map' object to get its parameters. - Volodya