Package

ammonite

terminal

Permalink

package terminal

Visibility
  1. Public
  2. All

Type Members

  1. class AnsiNav extends AnyRef

    Permalink
  2. case class ClearScreen(ts: TermState) extends TermAction with Product with Serializable

    Permalink
  3. final class ConsoleDim extends AnyRef

    Permalink
  4. abstract class DelegateFilter extends Filter

    Permalink

    A filter as an abstract class, letting you provide a filter instead of an op, automatically providing a good .toString for debugging, and providing a reasonable "place" inside the inheriting class/object to put state or helpers or other logic associated with the filter.

  5. abstract class Enum extends AnyRef

    Permalink

    A small helper class to quickly define enumerations: extend this class in your companion object and define the items via val a, b, c = Item(...) passing in your enum class constructor in place of ....

  6. trait Filter extends AnyRef

    Permalink

    The way you configure your terminal behavior; a trivial wrapper around a function, though you should provide a good .toString method to make debugging easier.

    The way you configure your terminal behavior; a trivial wrapper around a function, though you should provide a good .toString method to make debugging easier. The TermInfo and TermAction types are its interface to the terminal.

    Filters are composed sequentially: if a filter returns None the next filter is tried, while if a filter returns Some that ends the cascade. While your op function interacts with the terminal purely through immutable case classes, the Filter itself is free to maintain its own state and mutate it whenever, even when returning None to continue the cascade.

  7. case class LazyList[T](headThunk: () ⇒ T, tailThunk: () ⇒ LazyList[T]) extends Product with Serializable

    Permalink

    A truly-lazy implementation of scala.Stream

  8. class LineReader extends AnyRef

    Permalink

    Encapsulates the common configuration and logic around reading a single line of input

  9. case class Printing(ts: TermState, stdout: String) extends TermAction with Product with Serializable

    Permalink
  10. case class Prompt(full: Str, lastLine: Str) extends Product with Serializable

    Permalink
  11. case class Result(s: String) extends TermAction with Product with Serializable

    Permalink
  12. case class Strings(values: Seq[String]) extends Product with Serializable

    Permalink

    Implicitly instantiated class letting you pass in a single string or a sequence of strings anywhere a set of prefixes is required

  13. sealed trait TermAction extends AnyRef

    Permalink
  14. case class TermInfo(ts: TermState, width: Int) extends Product with Serializable

    Permalink
  15. case class TermState(inputs: LazyList[Int], buffer: Vector[Char], cursor: Int, msg: Str = "") extends TermAction with Product with Serializable

    Permalink

Value Members

  1. object AnsiNav

    Permalink
  2. object ConsoleDim

    Permalink
  3. object Debug

    Permalink

    Prints stuff to an ad-hoc logging file when running the ammonite repl or ammonite-terminal in development mode in its SBT project.

    Prints stuff to an ad-hoc logging file when running the ammonite repl or ammonite-terminal in development mode in its SBT project.

    Very handy for the common case where you're debugging terminal interactions and cannot use println because it will stomp all over your already messed up terminal state and block debugging. With Debug, you can have a separate terminal open tailing the log file and log as verbosely as you want without affecting the primary terminal you're using to interact with Ammonite.

  4. object Exit extends TermAction with Product with Serializable

    Permalink
  5. object Filter

    Permalink

    Convenience constructors to create Filter instances in a bunch of different ways

  6. object FilterTools

    Permalink

    A collection of helpers that to simpify the common case of building filters

  7. object LazyList extends Serializable

    Permalink
  8. object LineReader

    Permalink
  9. object Prompt extends Serializable

    Permalink
  10. object SpecialKeys

    Permalink

    One place to assign all the esotic control key input snippets to easy-to-remember names

  11. object Strings extends Serializable

    Permalink
  12. object TTY

    Permalink
  13. object TermState extends Serializable

    Permalink
  14. object Terminal

    Permalink

    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.

    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"

  15. package filters

    Permalink

Ungrouped