Skip to content

Commit

Permalink
Allow specify Candidates with group, keys and etc for StringCompleters
Browse files Browse the repository at this point in the history
  • Loading branch information
snuyanzin committed Jun 17, 2019
1 parent 8d1c903 commit a9fb948
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public StringsCompleter(Iterable<String> strings) {
}
}

public StringsCompleter(Candidate ... candidates) {
assert candidates != null;
this.candidates.addAll(Arrays.asList(candidates));
}

public void complete(LineReader reader, final ParsedLine commandLine, final List<Candidate> candidates) {
assert commandLine != null;
assert candidates != null;
Expand Down

0 comments on commit a9fb948

Please sign in to comment.