ParsedArgs

Represents parsed command-line arguments for a command.

Members

Functions

argument
string argument(string name)

Gets the first value for the argument with the given name.

argumentList
const(string[]) argumentList(string name)

Gets all values for the argument with the given name.

flag
uint flag(string name)

Returns the number of times the flag with the given name was passed.

flag
uint flag(const(Flag) flag)

Returns the number of times the given flag was passed.

hasArgument
bool hasArgument(string name)

Checks whether an argument with the given name is present.

hasArgument
bool hasArgument(const(Argument) argument)

Checks whether the given argument is present.

hasFlag
bool hasFlag(string name)

Checks whether the given flag name is present.

hasFlag
bool hasFlag(Flag flag)

Checks whether the given flag is present.

hasOption
bool hasOption(string name)

Checks whether an option with the given name is present.

hasOption
bool hasOption(const(Option) option)

Checks whether the given option is present.

option
string option(string name)

Gets the first value for the option with the given name.

optionList
const(string[]) optionList(string name)

Gets all values for the option with the given name.

optionList
const(string[]) optionList(Option option)

Gets all values for the given option.

Variables

command
const(Command) command;

Command associated with the parsed arguments.

program
const(Program) program;

Program associated with the parsed arguments.