completionOption

fun <T : BaseCliktCommand<*>> T.completionOption(vararg names: String = arrayOf("--generate-completion"), help: String = "", hidden: Boolean = false): T

Add an option to a command that will print a completion script for the given shell when invoked.