Interface CompletionMatcher

All Known Implementing Classes:
CompletionMatcherImpl

public interface CompletionMatcher
  • Method Details

    • compile

      void compile(Map<LineReader.Option,Boolean> options, boolean prefix, CompletingParsedLine line, boolean caseInsensitive, int errors, String originalGroupName)
      Compiles completion matcher functions
      Parameters:
      options - LineReader options
      prefix - invoked by complete-prefix or expand-or-complete-prefix widget
      line - The parsed line within which completion has been requested
      caseInsensitive - if completion is case insensitive or not
      errors - number of errors accepted in matching
      originalGroupName - value of JLineReader variable original-group-name
    • matches

      List<Candidate> matches(List<Candidate> candidates)
      Parameters:
      candidates - list of candidates
      Returns:
      a list of candidates that completion matcher matches
    • exactMatch

      Candidate exactMatch()
      Returns:
      a candidate that have exact match, null if no exact match found
    • getCommonPrefix

      String getCommonPrefix()
      Returns:
      a common prefix of matched candidates