clikt / com.github.ajalt.clikt.output / CliktHelpFormatter

CliktHelpFormatter

open class CliktHelpFormatter : HelpFormatter

Types

Name Summary
DefinitionRow data class DefinitionRow

Constructors

Name Summary
<init> CliktHelpFormatter(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, requiredOptionMarker:String? = null, showDefaultValues:Boolean= false, showRequiredTag:Boolean= false)

Properties

Name Summary
argumentsTitle val argumentsTitle:String
colSpacing val colSpacing:Int
commandMetavar val commandMetavar:String
commandsTitle val commandsTitle:String
graphemeLength The number of visible characters in a stringvalString.graphemeLength:Int
indent val indent:String
maxColWidth val maxColWidth:Int
optionsMetavar val optionsMetavar:String
optionsTitle val optionsTitle:String
requiredOptionMarker val requiredOptionMarker:String?
showDefaultValues val showDefaultValues:Boolean
showRequiredTag val showRequiredTag:Boolean
usageTitle val usageTitle:String
width val width:Int

Functions

Name Summary
addArguments open funStringBuilder.addArguments(parameters:List<ParameterHelp>):Unit
addCommands open funStringBuilder.addCommands(parameters:List<ParameterHelp>):Unit
addEpilog open funStringBuilder.addEpilog(epilog:String):Unit
addOptionGroup open funStringBuilder.addOptionGroup(title:String, help:String?, parameters:List<Option>):Unit
addOptions open funStringBuilder.addOptions(parameters:List<ParameterHelp>):Unit
addProlog open funStringBuilder.addProlog(prolog:String):Unit
addUsage open funStringBuilder.addUsage(parameters:List<ParameterHelp>, programName:String):Unit
appendDefinitionList funStringBuilder.appendDefinitionList(rows:List<DefinitionRow>):Unit
formatHelp Create the full help string.open fun formatHelp(prolog:String, epilog:String, parameters:List<ParameterHelp>, programName:String):String
formatUsage Create the one-line usage information for a command.open fun formatUsage(parameters:List<ParameterHelp>, programName:String):String
joinNamesForOption open fun joinNamesForOption(names:Set<String>):String
optionMetavar open fun optionMetavar(option: Option):String
renderArgumentName open fun renderArgumentName(name:String):String
renderHelpText open fun renderHelpText(help:String, tags:Map<String,String>):String
renderOptionName open fun renderOptionName(name:String):String
renderSectionTitle open fun renderSectionTitle(title:String):String
renderSubcommandName open fun renderSubcommandName(name:String):String
renderTag open fun renderTag(tag:String, value:String):String
shouldShowTag open fun shouldShowTag(tag:String, value:String):Boolean