Builder

class Builder(command: CliktCommand, val parent: Context? = null)

Constructors

Link copied to clipboard
constructor(command: CliktCommand, parent: Context? = null)

Properties

Link copied to clipboard

If true, short options can be grouped together after a single -.

Link copied to clipboard

If false, options and arguments cannot be mixed; the first time an argument is encountered, all remaining tokens are parsed as arguments.

Link copied to clipboard
var argumentFileReader: (filename: String) -> String?

A block that returns the content of an argument file for a given filename.

Link copied to clipboard

The prefix to add to inferred envvar names.

Link copied to clipboard

A callback called when the command line contains an invalid option or subcommand name. It takes the entered name and a list of all registered names option/subcommand names and filters the list down to values to suggest to the user.

Link copied to clipboard
var envvarReader: (key: String) -> String?

A function called by Clikt to get a parameter value from a given environment variable

Link copied to clipboard

If true, arguments starting with @ will be expanded as argument files. If false, they will be treated as normal arguments.

Link copied to clipboard

A lambda returning the help formatter for this command, or null to use the default

Link copied to clipboard

The names to use for the help option.

Link copied to clipboard

Localized strings to use for help output and error reporting.

Link copied to clipboard
var obj: Any?

Set an arbitrary object on the context.

Link copied to clipboard
val parent: Context? = null
Link copied to clipboard

Set this to false to prevent extra messages from being printed automatically.

Link copied to clipboard

If false,the valueSource is searched before environment variables.

Link copied to clipboard
var terminal: Terminal

The terminal that will handle reading and writing text.

Link copied to clipboard

An optional transformation function that is called to transform command line

Link copied to clipboard

The source that will attempt to read values for options that aren't present on the command line.

Functions

Link copied to clipboard
fun valueSources(vararg sources: ValueSource)

Set multiple sources that will attempt to read values for options not present on the command line.