Package org.jline.reader.impl
Class CompletionMatcherImpl
java.lang.Object
org.jline.reader.impl.CompletionMatcherImpl
- All Implemented Interfaces:
CompletionMatcher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancamelMatch(String word, int i, String candidate, int j) voidcompile(Map<LineReader.Option, Boolean> options, boolean prefix, CompletingParsedLine line, boolean caseInsensitive, int errors, String originalGroupName) Compiles completion matcher functionsprotected voiddefaultMatchers(Map<LineReader.Option, Boolean> options, boolean prefix, CompletingParsedLine line, boolean caseInsensitive, int errors, String originalGroupName) Default JLine matchersprotected voidreset(boolean caseInsensitive) simpleMatcher(Predicate<String> predicate) typoMatcher(String word, int errors, boolean caseInsensitive, String originalGroupName)
-
Field Details
-
exact
-
matchers
-
-
Constructor Details
-
CompletionMatcherImpl
public CompletionMatcherImpl()
-
-
Method Details
-
reset
protected void reset(boolean caseInsensitive) -
compile
public void compile(Map<LineReader.Option, Boolean> options, boolean prefix, CompletingParsedLine line, boolean caseInsensitive, int errors, String originalGroupName) Description copied from interface:CompletionMatcherCompiles completion matcher functions- Specified by:
compilein interfaceCompletionMatcher- Parameters:
options- LineReader optionsprefix- invoked by complete-prefix or expand-or-complete-prefix widgetline- The parsed line within which completion has been requestedcaseInsensitive- if completion is case insensitive or noterrors- number of errors accepted in matchingoriginalGroupName- value of JLineReader variable original-group-name
-
matches
-
exactMatch
- Specified by:
exactMatchin interfaceCompletionMatcher- Returns:
- a candidate that have exact match, null if no exact match found
-
getCommonPrefix
- Specified by:
getCommonPrefixin interfaceCompletionMatcher- Returns:
- a common prefix of matched candidates
-
defaultMatchers
protected void defaultMatchers(Map<LineReader.Option, Boolean> options, boolean prefix, CompletingParsedLine line, boolean caseInsensitive, int errors, String originalGroupName) Default JLine matchers -
simpleMatcher
-
typoMatcher
-
camelMatch
-