clikt / com.github.ajalt.clikt.core / NoRunCliktCommand

NoRunCliktCommand

open class ~~NoRunCliktCommand~~ : CliktCommand Deprecated: This class has been renamed to NoOpCliktCommand

Constructors

Name Summary
<init> NoRunCliktCommand(help:String= "", epilog:String= "", name:String? = null, invokeWithoutSubcommand:Boolean= false, printHelpOnEmptyArgs:Boolean= false, helpTags:Map<String,String> = emptyMap(), autoCompleteEnvvar:String? = "")

Functions

Name Summary
run Perform actions after parsing is complete and this command is invoked.open fun run():Unit

Extension Functions

Name Summary
argument Create a property delegate argument.funCliktCommand.argument(name:String= "", help:String= "", helpTags:Map<String,String> = emptyMap(), completionCandidates:CompletionCandidates? = null): RawArgument
context Configure this command’s Context.fun <T :CliktCommand> T.context(block: Builder.() ->Unit): T
eagerOption Add an eager option to this command that, when invoked, runs action.fun <T :CliktCommand> T.eagerOption(name:String, vararg additionalNames:String, help:String= "", hidden:Boolean= false, helpTags:Map<String,String> = emptyMap(), groupName:String? = null, action:OptionTransformContext.() ->Unit): T
fun <T :CliktCommand> T.eagerOption(names:Collection<String>, help:String= "", hidden:Boolean= false, helpTags:Map<String,String> = emptyMap(), groupName:String? = null, action:OptionTransformContext.() ->Unit): T
findObject Find the closest object of type T, or nullfun <T :Any>CliktCommand.findObject():ReadOnlyProperty<CliktCommand, T?>``fun <T :Any>CliktCommand.~~findObject~~(default: () -> T):ReadOnlyProperty<CliktCommand, T>
findOrSetObject Find the closest object of type T, setting context.obj if one is not found.fun <T :Any>CliktCommand.findOrSetObject(default: () -> T):ReadOnlyProperty<CliktCommand, T>
mutuallyExclusiveOptions Declare a set of two or more mutually exclusive options.fun <T :Any>ParameterHolder.mutuallyExclusiveOptions(option1:OptionDelegate<T?>, option2:OptionDelegate<T?>, vararg options:OptionDelegate<T?>, name:String? = null, help:String? = null):MutuallyExclusiveOptions<T, T?>
option Create a property delegate option.funParameterHolder.option(vararg names:String, help:String= "", metavar:String? = null, hidden:Boolean= false, envvar:String? = null, envvarSplit:Regex? = null, helpTags:Map<String,String> = emptyMap(), completionCandidates:CompletionCandidates? = null):RawOption
requireObject Find the closest object of type T, or throw a NullPointerExceptionfun <T :Any>CliktCommand.requireObject():ReadOnlyProperty<CliktCommand, T>
subcommands Add the given commands as a subcommand of this command.fun <T :CliktCommand> T.subcommands(commands:Iterable<CliktCommand>): T
fun <T :CliktCommand> T.subcommands(vararg commands:CliktCommand): T
versionOption Add an eager option to this command that, when invoked, prints a version message and exits.fun <T :CliktCommand> T.versionOption(version:String, help:String= "Show the version and exit", names:Set<String> = setOf("--version"), message: (String) ->String= { "$commandName version $it" }): T