A build for Vert.x Shell command.
| Constructor and description |
|---|
CommandBuilder
(Object delegate) |
| Type | Name and description |
|---|---|
Command |
build()Build the command |
static CommandBuilder |
command(String name)Create a new commmand builder, the command is responsible for managing the options and arguments via the #args() arguments. |
static CommandBuilder |
command(CLI cli)Create a new commmand with its io.vertx.groovy.core.cli.CLI descriptor. |
CommandBuilder |
completionHandler(Handler<Completion> handler)Set the command completion handler, the completion handler when the user asks for contextual command line completion, usually hitting the tab key. |
Object |
getDelegate() |
CommandBuilder |
processHandler(Handler<CommandProcess> handler)Set the command process handler, the process handler is called when the command is executed. |
Build the command
Create a new commmand builder, the command is responsible for managing the options and arguments via the #args() arguments.
name - the command nameCreate a new commmand with its io.vertx.groovy.core.cli.CLI descriptor. This command can then retrieve the parsed CommandProcess.commandLine when it executes to know get the command arguments and options.
cli - the cli to useSet the command completion handler, the completion handler when the user asks for contextual command line completion, usually hitting the tab key.
handler - the completion handlerSet the command process handler, the process handler is called when the command is executed.
handler - the process handlerio.vertx:vertx-shell:3.1.0