HelpCommand

Command to display help for commands.

class HelpCommand : Command {}

Constructors

this
this(string description)

Constructs a new HelpCommand instance.

Inherited Members

From Command

chain
Command[] chain;

Chain of commands leading to this command.

name
string name()

Gets the name of the command.

description
Command description(string description)

Sets the description of the command

description
string description()

Gets the description of the command

findCommand
const(Command) findCommand(string name, const(Command) root)

Searches for a subcommand with the specified name.

add
Command add(Command cmd)

Adds a subcommand.

command
Command command(Command cmd)

Adds a subcommand.

add
Command add(Option option)

Adds an option.

add
Command add(Flag flag)

Adds a flag.

option
Command option(string format, string description, string defaultValue)

Adds an option or flag from formatted string.

add
Command add(Argument arg)

Adds an argument.

argument
Command argument(string format, string description, string defaultValue)

Adds an argument from formatted string.

action
Command action(int delegate(ParsedArgs) action)

Sets the action delegate to be executed for this command. The default action is to print help for the command.

usage
string usage(bool colors)

Gets the usage string for this command.

printHelp
int printHelp()

Prints help for the command.

error
void error(string description)

Prints an error message to stderr.

error
noreturn error(string description, int status)

Prints an error message to stderr and exits with status.