StringPrompt

class StringPrompt(prompt: String, terminal: Terminal, default: String? = null, showDefault: Boolean = false, showChoices: Boolean = true, hideInput: Boolean = false, choices: List<String> = emptyList(), promptSuffix: String = ": ", invalidChoiceMessage: String = "Invalid value, choose from ", allowBlank: Boolean = true) : Prompt<String>

A Prompt that returns the user input unchanged.

Constructors

Link copied to clipboard
constructor(prompt: String, terminal: Terminal, default: String? = null, showDefault: Boolean = false, showChoices: Boolean = true, hideInput: Boolean = false, choices: List<String> = emptyList(), promptSuffix: String = ": ", invalidChoiceMessage: String = "Invalid value, choose from ", allowBlank: Boolean = true)

Properties

Link copied to clipboard

The terminal to use

Functions

Link copied to clipboard
open fun ask(): String?

Run the prompt, asking the user for input.