NoOpCliktCommand

open class NoOpCliktCommand(help: String, epilog: String, name: String?, invokeWithoutSubcommand: Boolean, printHelpOnEmptyArgs: Boolean, helpTags: Map<String, String>, autoCompleteEnvvar: String?, allowMultipleSubcommands: Boolean) : CliktCommand

A CliktCommand that has a default implementation of CliktCommand.run that is a no-op.

Constructors

Link copied to clipboard
fun NoOpCliktCommand(help: String = "", epilog: String = "", name: String? = null, invokeWithoutSubcommand: Boolean = false, printHelpOnEmptyArgs: Boolean = false, helpTags: Map<String, String> = emptyMap(), autoCompleteEnvvar: String? = "", allowMultipleSubcommands: Boolean = false)

Functions

Link copied to clipboard
open fun aliases(): Map<String, List<String>>

A list of command aliases.

Link copied to clipboard
open fun getFormattedHelp(): String

Return the full help string for this command.

Link copied to clipboard
open fun getFormattedUsage(): String

Return the usage string for this command.

Link copied to clipboard
fun issueMessage(message: String)

Add a message to be printed after parsing

Link copied to clipboard
fun main(argv: Array<out String>): <ERROR CLASS>

fun main(argv: List<String>)

Parse the command line and print helpful output if any errors occur.

Link copied to clipboard
fun parse(argv: Array<String>, parentContext: Context? = null)

fun parse(argv: List<String>, parentContext: Context? = null)

Parse the command line and throw an exception if parsing fails.

Link copied to clipboard
fun registerArgument(argument: Argument)

Register an argument with this command.

Link copied to clipboard
fun registeredArguments(): List<Argument>

Get a read-only list of arguments registered in this command (e.g. via registerArgument or an argument delegate)

Link copied to clipboard
fun registeredOptions(): List<Option>

Get a read-only list of options registered in this command (e.g. via registerOption or an option delegate)

Link copied to clipboard
fun registeredParameterGroups(): List<ParameterGroup>

Get a read-only list of groups registered in this command (e.g. via registerOptionGroup or an OptionGroup delegate)

Link copied to clipboard
fun registeredSubcommandNames(): List<String>

The names of all direct children of this command

Link copied to clipboard
fun registeredSubcommands(): List<CliktCommand>

Get a read-only list of commands registered as subcommands of this command.

Link copied to clipboard
open override fun registerOption(option: GroupableOption)

Register an option with this command or group.

fun registerOption(option: Option)

Register an option with this command.

Link copied to clipboard
fun registerOptionGroup(group: ParameterGroup)

Register a group with this command.

Link copied to clipboard
open override fun run()

Perform actions after parsing is complete and this command is invoked.

Link copied to clipboard
open override fun toString(): <ERROR CLASS>

Properties

Link copied to clipboard
open val commandHelp: String

The help text for this command.

Link copied to clipboard
open val commandHelpEpilog: String

Help text to display at the end of the help output, after any parameters.

Link copied to clipboard
val commandName: String

The name of this command, used in help output.

Link copied to clipboard
val currentContext: Context

This command's context.

Link copied to clipboard
val helpTags: Map<String, String>
Link copied to clipboard
val invokeWithoutSubcommand: Boolean = false
Link copied to clipboard
val messages: List<String>

All messages issued during parsing.

Link copied to clipboard
val printHelpOnEmptyArgs: Boolean = false