Class FuzzySearchHistory

java.lang.Object
org.aesh.readline.action.mappings.FuzzySearchHistory
All Implemented Interfaces:
Consumer<InputProcessor>, Action, ActionEvent

public class FuzzySearchHistory extends Object implements ActionEvent
Interactive fuzzy history search (fzf-style).

Renders a multi-line list of matching history entries below the prompt in fzf's reverse layout (query at top, results growing downward):

  prompt$ ___                          (original prompt, untouched)
  > query_                      3/20   (query line + match count)
  > git status                         (selected, highlighted)
    git commit -m "initial commit"
    mvn clean test
    grep -rn "FuzzyMatch" src/
See Also:
  • Constructor Details

    • FuzzySearchHistory

      public FuzzySearchHistory()
      Create a new fuzzy history search action.
  • Method Details

    • name

      public String name()
      Description copied from interface: Action
      Returns the name of this action.
      Specified by:
      name in interface Action
      Returns:
      the action name
    • input

      public void input(Action action, org.aesh.terminal.KeyAction key)
      Description copied from interface: ActionEvent
      Processes an input event with the given action and key.
      Specified by:
      input in interface ActionEvent
      Parameters:
      action - the action that triggered this input
      key - the key action associated with the input
    • keepFocus

      public boolean keepFocus()
      Description copied from interface: ActionEvent
      Returns whether this action event should retain focus after processing.
      Specified by:
      keepFocus in interface ActionEvent
      Returns:
      true if this event should keep focus
    • accept

      public void accept(InputProcessor inputProcessor)
      Description copied from interface: Action
      Executes this action on the given input processor.
      Specified by:
      accept in interface Action
      Specified by:
      accept in interface Consumer<InputProcessor>
      Parameters:
      inputProcessor - the input processor to operate on