Argument

CLI Argument / Flag

Represents a unique cli flag that can have a short and/or long form.

Members

Functions

description
Argument description(string d)

Set this argument's description

description
string description()

Get this argument's description.

hasDescription
bool hasDescription()

Whether or not this argument has a description set.

hasLongFlag
bool hasLongFlag()

Returns whether or not this argument has a long flag set.

hasOptionalParam
bool hasOptionalParam()

Returns whether this Argument has a parameter which is optional.

hasShortFlag
bool hasShortFlag()

Returns whether or not this argument has a short flag set.

longFlag
Argument longFlag(string l)

Sets this argument's long flag. Returns the current Argument instance.

longFlag
string longFlag()

Returns this argument's long flag.

optionalParam
Argument optionalParam()

Sets this Argument to expect an optional value parameter.

paramRequired
bool paramRequired()

Whether or not this Argument requires a parameter value.

parameterized
bool parameterized()

Returns whether or not this argument expects a value parameter.

require
Argument require()

Sets this argument as required.

requireParam
Argument requireParam()

Sets this Argument to require a parameter value.

required
bool required()

Returns whether or not this Argument is required.

set
bool set()

Get whether or not this flag was used

shortFlag
Argument shortFlag(char c)

Sets this argument's short flag. Returns the current Argument instance.

shortFlag
char shortFlag()

Returns this argument's short flag

use
void use()

Marks this Argument has having been used. Additionally increments the internal usage counter.

uses
uint uses()

Get number of times this argument was used

value
void value(string val)

Appends a parameter value to this argument.

values
string[] values()

Get values passed to this argument from each usage on the command line.

Meta