clikt / com.github.ajalt.clikt.output / NonInteractiveCliktConsole / promptForLine

promptForLine

fun promptForLine(prompt: String, hideInput: Boolean): String?

Overrides CliktConsole.promptForLine

Show the prompt to the user, and return a line of their response.

This function will block until a line of input has been read.

Parameters

prompt - The text to display to the user

hideInput - If true, the user's input should not be echoed to the screen. If the current console does not support hidden input, this argument may be ignored..

Return
A line of user input, or null if an error occurred.