Filter

ammonite.terminal.Filter
See theFilter companion object
trait Filter

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.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Abstract methods

def identifier: String

the .toString of this object, except by making it separate we force the implementer to provide something and stop them from accidentally leaving it as the meaningless default.

the .toString of this object, except by making it separate we force the implementer to provide something and stop them from accidentally leaving it as the meaningless default.

Attributes

def op(ti: TermInfo): Option[TermAction]

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Any