Interface CompletionMatcher

    • Method Detail

      • compile

        void compile​(java.util.Map<LineReader.Option,​java.lang.Boolean> options,
                     boolean prefix,
                     CompletingParsedLine line,
                     boolean caseInsensitive,
                     int errors,
                     java.lang.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

        java.util.List<Candidate> matches​(java.util.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

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