Package org.jline.builtins
Class Completers.RegexCompleter
java.lang.Object
org.jline.builtins.Completers.RegexCompleter
- All Implemented Interfaces:
Completer
- Enclosing class:
Completers
A completer that uses regular expressions to match command patterns.
This completer uses a non-deterministic finite automaton (NFA) to match command patterns and provide appropriate completions based on the current state of the command line.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A simple implementation of ParsedLine for argument completion. -
Constructor Summary
ConstructorsConstructorDescriptionRegexCompleter
(String syntax, Function<String, Completer> completers) Creates a new RegexCompleter with the specified syntax and completers. -
Method Summary
Modifier and TypeMethodDescriptionvoid
complete
(LineReader reader, ParsedLine line, List<Candidate> candidates) Completes the current input line using the regex pattern.
-
Constructor Details
-
RegexCompleter
Creates a new RegexCompleter with the specified syntax and completers.- Parameters:
syntax
- the regular expression syntax for command patternscompleters
- a function that provides completers by name
-
-
Method Details
-
complete
Completes the current input line using the regex pattern.Finds all possible next states in the NFA and applies the corresponding completers to generate completion candidates.
-