getKey

fun getKey(prefix: String = "", joinSubcommands: String? = null, uppercase: Boolean = false, replaceDashes: String = "-"): (Context, Option) -> String

Create a function that will return string keys for options.

By default, keys will be equal to the value returned by name.

Parameters

prefix

A static string prepended to all keys

joinSubcommands

If null, keys will not include names of subcommands. If given, this string be used will join subcommand names to the beginning of keys. For options that are in a root command, this has no effect. For option in subcommands, the subcommand name will be joined. The root command name is never included.

uppercase

If true, returned keys will be entirely uppercase.

replaceDashes

- characters in option names will be replaced with this character.