Command.option

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

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

Parameters

format string

Formatted string defining the option.

description string

Description of the option.

defaultValue string

Default value of the parameter, or null.

completer string[] delegate
(
string prefix
)

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