Implement interactive completion

- This is a re-implementation of a interactive completion
  with breaking changes as it moves away from a direct use
  of a MethodParameter in favour of a CommandRegistration
  and its option definitions.
- Fixes #449
This commit is contained in:
Janne Valkealahti
2022-06-28 10:03:50 +01:00
parent 341a69e6e0
commit 5eaa5dd093
18 changed files with 364 additions and 247 deletions

View File

@@ -52,7 +52,7 @@ public class CompleterAutoConfiguration {
public void complete(LineReader reader, ParsedLine line, List<Candidate> candidates) {
CompletingParsedLine cpl = (line instanceof CompletingParsedLine) ? ((CompletingParsedLine) line) : t -> t;
CompletionContext context = new CompletionContext(sanitizeInput(line.words()), line.wordIndex(), line.wordCursor());
CompletionContext context = new CompletionContext(sanitizeInput(line.words()), line.wordIndex(), line.wordCursor(), null, null);
List<CompletionProposal> proposals = shell.complete(context);
proposals.stream()