Class HistorySuggestionProvider

java.lang.Object
org.aesh.readline.history.HistorySuggestionProvider
All Implemented Interfaces:
org.aesh.readline.suggestion.SuggestionProvider

public class HistorySuggestionProvider extends Object implements org.aesh.readline.suggestion.SuggestionProvider
Provides inline ghost text suggestions from command history. Searches history for the most recent entry that starts with the current buffer content and returns the suffix as a suggestion.

Similar to fish shell's auto-suggestions feature.

Author:
Aesh team
  • Constructor Details

    • HistorySuggestionProvider

      public HistorySuggestionProvider(History history)
      Create a new suggestion provider backed by the given history.
      Parameters:
      history - the history to search for suggestions
  • Method Details

    • suggest

      public String suggest(String buffer)
      Specified by:
      suggest in interface org.aesh.readline.suggestion.SuggestionProvider