CommandInfo

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Members

Functions

Description
auto ref Description(string text)
Undocumented in source. Be warned that the author may not have intended to support it.
Epilog
auto ref Epilog(string text)
Undocumented in source. Be warned that the author may not have intended to support it.
ShortDescription
auto ref ShortDescription(string text)
Undocumented in source. Be warned that the author may not have intended to support it.
Usage
auto ref Usage(string text)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

description
string description;
Undocumented in source.
epilog
string epilog;
Undocumented in source.
names
string[] names;
Undocumented in source.
shortDescription
string shortDescription;
Undocumented in source.
usage
string usage;
Undocumented in source.

Examples

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

struct T
{
    @NamedArgument
    int a;
    @(NamedArgument.Optional())
    int b;
    @(NamedArgument.Required())
    int c;
    @NamedArgument
    int d;
    @(NamedArgument.Required())
    int e;
    @NamedArgument
    int f;
}

enum config = {
    Config config;
    config.addHelp = false;
    return config;
}();

static assert(CommandArguments!T(config).arguments.arguments.length == 6);

auto a = CommandArguments!T(config);
assert(a.arguments.requiredGroup.arguments == [2,4]);
assert(a.arguments.argsNamed == ["a":0LU, "b":1LU, "c":2LU, "d":3LU, "e":4LU, "f":5LU]);
assert(a.arguments.argsPositional == []);

Meta