use of org.jline.builtins.Completers.FilesCompleter in project felix by apache.
the class Builtin method __files.
public List<Candidate> __files(CommandSession session) {
ParsedLine line = Shell.getParsedLine(session);
LineReader reader = Shell.getReader(session);
List<Candidate> candidates = new ArrayList<>();
new FilesCompleter(session.currentDir()) {
@Override
protected String getDisplay(Terminal terminal, Path p) {
return getFileDisplay(session, p);
}
}.complete(reader, line, candidates);
return candidates;
}
Aggregations