TermUi

object TermUi

Functions

confirm
Link copied to clipboard
common
fun confirm(text: String, default: Boolean = false, abort: Boolean = false, promptSuffix: String = ": ", showDefault: Boolean = true, console: CliktConsole = defaultCliktConsole()): Boolean?
Prompt for user confirmation.
echo
Link copied to clipboard
common
fun echo(message: Any?, trailingNewline: Boolean = true, err: Boolean = false, console: CliktConsole = defaultCliktConsole(), lineSeparator: String = console.lineSeparator)
Print the message to the screen.
editFile
Link copied to clipboard
common
fun editFile(filename: String, editor: String? = null, env: Map<String, String> = emptyMap(), requireSave: Boolean = false, extension: String = ".txt")
Edit the file with filename in the editor.
editText
Link copied to clipboard
common
fun editText(text: String, editor: String? = null, env: Map<String, String> = emptyMap(), requireSave: Boolean = false, extension: String = ".txt"): String?
Edit text in the editor.
prompt
Link copied to clipboard
common
fun prompt(text: String, default: String? = null, hideInput: Boolean = false, requireConfirmation: Boolean = false, confirmationPrompt: String = "Repeat for confirmation: ", promptSuffix: String = ": ", showDefault: Boolean = true): String?
Prompt a user for text input.
fun <T> prompt(text: String, default: String? = null, hideInput: Boolean = false, requireConfirmation: Boolean = false, confirmationPrompt: String = "Repeat for confirmation: ", promptSuffix: String = ": ", showDefault: Boolean = true, console: CliktConsole = defaultCliktConsole(), convert: (String) -> T): T?
Prompt a user for text input.

Properties

isWindows
Link copied to clipboard
common
val isWindows: Boolean
True if the current platform is a version of windows.