clikt / com.github.ajalt.clikt.output / PlaintextHelpFormatter

PlaintextHelpFormatter

open class PlaintextHelpFormatter : HelpFormatter

Constructors

<init>

PlaintextHelpFormatter(indent: String = " ", width: Int? = null, maxWidth: Int = 78, maxColWidth: Int? = null, usageTitle: String = "Usage:", optionsTitle: String = "Options:", argumentsTitle: String = "Arguments:", commandsTitle: String = "Commands:", optionsMetavar: String = "[OPTIONS]", commandMetavar: String = "COMMAND [ARGS]...", colSpacing: Int = 2)

Properties

argumentsTitle

val argumentsTitle: String

colSpacing

val colSpacing: Int

commandMetavar

val commandMetavar: String

commandsTitle

val commandsTitle: String

indent

val indent: String

maxColWidth

val maxColWidth: Int

optionsMetavar

val optionsMetavar: String

optionsTitle

val optionsTitle: String

usageTitle

val usageTitle: String

width

val width: Int

Functions

addArguments

open fun StringBuilder.addArguments(parameters: List<ParameterHelp>): Unit

addCommands

open fun StringBuilder.addCommands(parameters: List<ParameterHelp>): Unit

addEpilog

open fun StringBuilder.addEpilog(epilog: String): Unit

addOptions

open fun StringBuilder.addOptions(parameters: List<ParameterHelp>): Unit

addProlog

open fun StringBuilder.addProlog(prolog: String): Unit

addUsage

open fun StringBuilder.addUsage(parameters: List<ParameterHelp>, programName: String): Unit

appendDefinitionList

fun StringBuilder.appendDefinitionList(rows: List<Pair<String, String>>): Unit

formatHelp

open fun formatHelp(prolog: String, epilog: String, parameters: List<ParameterHelp>, programName: String): String

Create the full help string.

formatUsage

open fun formatUsage(parameters: List<ParameterHelp>, programName: String): String

Create the one-line usage information for a command.

joinOptionNames

open fun joinOptionNames(names: Set<String>): String

optionMetavar

open fun optionMetavar(option: Option): String