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