Command.argument

Adds an argument from formatted string with a default value and a function that provides the suggestions for its value.

  1. Command argument(string format, string description, string defaultValue)
  2. Command argument(string format, string description, string[] delegate(string prefix) completer)
  3. Command argument(string format, string description, string defaultValue, string[] delegate(string prefix) completer)
    class Command
    @safe
    argument
    (
    string format
    ,,,
    string[] delegate
    (
    string prefix
    )
    completer
    )

Parameters

format string

Formatted string defining the argument.

description string

Description of the argument.

defaultValue string

Default value of the argument, or null.

completer string[] delegate
(
string prefix
)

Function receiving the typed prefix of the value and returning the suggestions.

Throws

AssertError if the argument format is invalid or an argument with the same name already exists.