Module dext.args

Provides some convenience functionality for parsing command-line arguments by piggy-backing off std.getopt.

Functions

NameDescription
parseArgs(args, formatter) Use std.getopt.getopt to parse command-line arguments into a class or struct.
parseArgs(args, instance, formatter) Use std.getopt.getopt to parse command-line arguments into a class or struct.

Structs

NameDescription
AllowBundling Allow short options to be bundled e.g. '-xvf'. Incompatible with [NoBundling].
A banner that will be printed to the usage screen before the options.
CaseInsensitive Indicates that argument parsing is case-insensitive. Incompatible with [CaseSensitive].
CaseSensitive Indicates that that argument parsing is case-sensitive. Incompatible with [CaseInsensitive].
Help Help string for an option that will be displayed on the usage screen.
KeepEndOfOptions Keep the end-of-options marker string.
MyOptions
NoBundling Disallow short options to be bundled. Incompatible with [AllowBundling].
NoPassThrough Don't pass unrecognized options through silently. Incompatible with [PassThrough].
PassThrough Pass unrecognized options through silently. Incompatible with [NoPassThrough].
Required Indicates that an option is required.
ShortName A single printable character representing a short flag for a command line argument. e.x. '-v'
StopOnFirstNonOption Stops processing on the first string that doesn't look like an option.

Enums

NameDescription
Color

Aliases

NameTypeDescription
OptionFormatter string delegate(string, std.getopt.Option[])