Skip to content

Alt-Name Support

Compare
Choose a tag to compare
@adishavit adishavit released this 09 Sep 09:18
· 54 commits to master since this release

The main changes:

  • Multi-name flag/option support. Just provide a list of alternate names in { ... }.
    The first match will return.
    Example:
    cmdl({ "-t", "--threshold"}, 128) >> theshold;
    If either t or threshold were specified (dashes are ignored), set threshold to that value.
    Otherwise use the default: 128.

  • No need to provide argc to parser.
    You can now write:

    int main(int, char* argv[])
    {
         argh::parser cmdl(argv); // Look Ma! no argc!
         // ....
  • Some internal refactoring.