class

Icr::BasicLineEditor

Inherits Icr::LineEditor < Reference < Object

Non-interactive fallback: plain gets, no history navigation.

Constructors

new(input : IO = STDIN, output : IO = STDOUT)
Source

Instance methods

read_line(prompt : String, history : Array(String)) : String | Nil

Read one line, rendering prompt and walking history with ↑/↓. Returns nil on EOF (Ctrl+D on an empty line); Ctrl+C discards the line and returns "".

Source