clikt / com.github.ajalt.clikt.parameters.options / flag

flag

fun RawOption.flag(vararg secondaryNames: String, default: Boolean = false): FlagOption<Boolean>

Turn an option into a boolean flag.

Parameters

secondaryNames - additional names for that option that cause the option value to be false. It’s good practice to provide secondary names so that users can disable an option that was previously enabled.

default - the value for this property if the option is not given on the command line.