Terminal.getline

Gets a line, including user editing. Convenience method around the LineGetter class and RealTimeConsoleInput facilities - use them if you need more control.

More...
struct Terminal
string
getline
(
string prompt = null
)

Detailed Description

You can set the lineGetter member directly if you want things like stored history.
Terminal terminal = Terminal(ConsoleOutputType.linear);
terminal.lineGetter = new LineGetter(&terminal, "my_history");

auto line = terminal.getline("$ ");
terminal.writeln(line);

You really shouldn't call this if stdin isn't actually a user-interactive terminal! So if you expect people to pipe data to your app, check for that or use something else. See stdinIsTerminal.

Suggestion Box / Bug Report