ammonite.terminal.filters

HistoryFilter

class HistoryFilter extends DelegateFilter

Provides history navigation up and down, saving the current line, a well as history-search functionality (Ctrl R in bash) letting you quickly find & filter previous commands by entering a sub-string.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HistoryFilter
  2. DelegateFilter
  3. Filter
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def activeHistory: Boolean

  7. def activeSearch: Boolean

  8. final def asInstanceOf[T0]: T0

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

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def ctrlR(b: Vector[Char], c: Int): (Vector[Char], Int, String)

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

  13. val dropHistoryChars: Set[Int]

  14. implicit val enclosing: Enclosing

    Definition Classes
    DelegateFilter
  15. def endHistory(): Unit

  16. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  18. def filter: Filter

    Definition Classes
    HistoryFilterDelegateFilter
  19. def filter0: Filter

  20. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  23. var historyIndex: Int

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

  24. 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.

    Definition Classes
    DelegateFilterFilter
  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def op(ti: TermInfo): Option[TermAction]

    Definition Classes
    DelegateFilterFilter
  30. def prelude: Filter

  31. var prevBuffer: Option[Vector[Char]]

    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

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

  33. def searchHistory(start: Int, increment: Int, buffer: Vector[Char], skipped: Vector[Char]): (Vector[Char], Int, String)

  34. def searchOrHistoryAnd(cond: Boolean): Boolean

    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.

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

    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

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

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

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

    Definition Classes
    AnyRef
  38. def toString(): String

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

  40. final def wait(): Unit

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

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

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

Inherited from DelegateFilter

Inherited from Filter

Inherited from AnyRef

Inherited from Any

Ungrouped