open class NoRunCliktCommand : CliktCommand
A CliktCommand that has a default implementation of CliktCommand.run that is a no-op.
NoRunCliktCommand(help: String = "", epilog: String = "", name: String? = null)
A CliktCommand that has a default implementation of CliktCommand.run that is a no-op. |
val commandHelp: String |
|
val commandHelpEpilog: String |
|
val commandName: String |
|
val context: Context
This command's context. |
|
val invokeWithoutSubcommand: Boolean
Used when this command has subcommands, and this command is called without a subcommand. If true, run will be called. By default, a PrintHelpMessage is thrown instead. |
open fun run(): Unit
Perform actions after parsing is complete and this command is invoked. |
open fun aliases(): Map<String, List<String>>
A list of command aliases. |
|
open fun getFormattedHelp(): String
Return the full help string for this command. |
|
open fun getFormattedUsage(): String
Return the usage string for this command. |
|
fun main(argv: List<String>): Unit
Parse the command line and print helpful output if any errors occur. fun main(argv: Array<String>): Unit |
|
fun parse(argv: List<String>, parentContext: Context? = null): Unit
Parse the command line and throw an exception if parsing fails. fun parse(argv: Array<String>, parentContext: Context? = null): Unit |
|
fun registerArgument(argument: Argument): Unit
Register an argument with this command. |
|
fun registerOption(option: Option): Unit
Register an option with this command. |
|
fun registeredSubcommandNames(): List<String>
The names of all direct children of this command |
|
fun shortHelp(): String
The help displayed in the commands list when this command is used as a subcommand. |
fun CliktCommand.argument(name: String = "", help: String = ""): RawArgument
Create a property delegate argument. |
|
fun <T : Any> CliktCommand.findObject(): ReadOnlyProperty<CliktCommand, T?>
Find the closest object of type T, or null fun <T : Any> CliktCommand.findObject(default: () -> T): ReadOnlyProperty<CliktCommand, T>
Find the closest object of type T, setting |
|
fun CliktCommand.option(vararg names: String, help: String = "", metavar: String? = null, : Boolean = false, envvar: String? = null): RawOption
Create a property delegate option. |
|
fun <T : Any> CliktCommand.requireObject(): ReadOnlyProperty<CliktCommand, T>
Find the closest object of type T, or throw a NullPointerException |