Class/Object

ammonite.terminal

HistoryFilter

Related Docs: object HistoryFilter | package terminal

Permalink

class HistoryFilter extends DelegateFilter

Provides history navigation up and down, saving the current line.

Linear Supertypes
DelegateFilter, PartialFunction[TermInfo, TermAction], (TermInfo) ⇒ TermAction, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HistoryFilter
  2. DelegateFilter
  3. PartialFunction
  4. Function1
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HistoryFilter(history: () ⇒ IndexedSeq[String], commentStartColor: String, commentEndColor: String)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def activeHistory: Boolean

    Permalink
  5. def activeSearch: Boolean

    Permalink
  6. def andThen[C](k: (TermAction) ⇒ C): PartialFunction[TermInfo, C]

    Permalink
    Definition Classes
    PartialFunction → Function1
  7. def apply(v1: TermInfo): TermAction

    Permalink
    Definition Classes
    DelegateFilter → Function1
  8. def applyOrElse[A1 <: TermInfo, B1 >: TermAction](x: A1, default: (A1) ⇒ B1): B1

    Permalink
    Definition Classes
    PartialFunction
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def backspace(b: Vector[Char], c: Int): (Vector[Char], Int, String)

    Permalink
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def compose[A](g: (A) ⇒ TermInfo): (A) ⇒ TermAction

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  13. def ctrlR(b: Vector[Char], c: Int): (Vector[Char], Int, String)

    Permalink
  14. def down(b: Vector[Char], c: Int): (Vector[Char], Int, String)

    Permalink
  15. val dropHistoryChars: Set[Int]

    Permalink
  16. def endHistory(): Unit

    Permalink
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  19. def filter: PartialFunction[TermInfo, TermAction]

    Permalink
    Definition Classes
    HistoryFilterDelegateFilter
  20. def filter0: Filter

    Permalink
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. var historyIndex: Int

    Permalink

    -1 means we haven't started looking at history, n >= 0 means we're currently at history command n

  25. def isDefinedAt(x: TermInfo): Boolean

    Permalink
    Definition Classes
    DelegateFilter → PartialFunction
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. def lift: (TermInfo) ⇒ Option[TermAction]

    Permalink
    Definition Classes
    PartialFunction
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def orElse[A1 <: TermInfo, B1 >: TermAction](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

    Permalink
    Definition Classes
    PartialFunction
  32. def prelude: Filter

    Permalink
  33. var prevBuffer: Option[Vector[Char]]

    Permalink

    Records the last buffer that the filter has observed while it's in search/history mode.

    Records the last buffer that the filter has observed while it's in search/history mode. If the new buffer differs from this, assume that some other filter modified the buffer and drop out of search/history

  34. def printableChar(char: Char)(b: Vector[Char], c: Int): (Vector[Char], Int, String)

    Permalink
  35. def runWith[U](action: (TermAction) ⇒ U): (TermInfo) ⇒ Boolean

    Permalink
    Definition Classes
    PartialFunction
  36. def searchHistory(start: Int, increment: Int, buffer: Vector[Char], skipped: Vector[Char]): (Vector[Char], Int, String)

    Permalink
  37. def searchOrHistoryAnd(cond: Boolean): Boolean

    Permalink

    Predicate to check if either we're searching for a term or if we're in history-browsing mode and some predicate is true.

    Predicate to check if either we're searching for a term or if we're in history-browsing mode and some predicate is true.

    Very often we want to capture keystrokes in search-mode more aggressively than in history-mode, e.g. search-mode drops you out more aggressively than history-mode does, and its up/down keys cycle through history more aggressively on every keystroke while history-mode only cycles when you reach the top/bottom line of the multi-line input.

  38. var searchTerm: Option[Vector[Char]]

    Permalink

    The term we're searching for, if any.

    The term we're searching for, if any.

    - None means we're not searching for anything, e.g. we're just browsing history

    - Some(term) where term is not empty is what it normally looks like when we're searching for something

    - Some(term) where term is empty only really happens when you start searching and delete things, or if you Ctrl-R on an empty prompt

  39. def startHistory(b: Vector[Char], c: Int): (Vector[Char], Int, String)

    Permalink

    Kicks the HistoryFilter from passive-mode into search-history mode

  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def toString(): String

    Permalink
    Definition Classes
    Function1 → AnyRef → Any
  42. def up(b: Vector[Char], c: Int): (Vector[Char], Int, String)

    Permalink
  43. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def wrap(rest: LazyList[Int], out: (Vector[Char], Int, String)): TermState

    Permalink

Inherited from DelegateFilter

Inherited from PartialFunction[TermInfo, TermAction]

Inherited from (TermInfo) ⇒ TermAction

Inherited from AnyRef

Inherited from Any

Ungrouped