Terminal

ammonite.terminal.Terminal$
object Terminal

The core logic around a terminal; it defines the base filters API through which anything (including basic cursor-navigation and typing) interacts with the terminal.

Maintains basic invariants, such as "cursor should always be within the buffer", and "ansi terminal should reflect most up to date TermState"

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Types

type Action = (Vector[Char], Int) => (Vector[Char], Int)
type MsgAction = (Vector[Char], Int) => (Vector[Char], Int, String)

Value members

Concrete methods

def readLine(prompt: Prompt, reader: Reader, writer: Writer, filters: Filter, displayTransform: (Vector[Char], Int) => (Str, Int)): Option[String]

Blockingly reads a line from the given input stream and returns it.

Blockingly reads a line from the given input stream and returns it.

Attributes

displayTransform

code to manipulate the display of the buffer and cursor, without actually changing the logical values inside them.

filters

A set of actions that can be taken depending on the input, to manipulate the internal state of the terminal.

prompt

The prompt to display when requesting input

reader

The input-stream where characters come in, e.g. System.in

writer

The output-stream where print-outs go, e.g. System.out