I want to use JLine to build a simple CLI. But I ran into a problem. File name completer doesn't work properly on Windows.
When I enter 8> first C:\
and press tab, completer do nothing although it should display all subfolders.
Here is my code:
ArgumentCompleter completer1 = new ArgumentCompleter(
new StringsCompleter("first"),
new FileNameCompleter(),
new NullCompleter()
);
ArgumentCompleter completer2 = new ArgumentCompleter(
new StringsCompleter("second"),
new NullCompleter()
);
AggregateCompleter completer3 = new AggregateCompleter(
completer1, completer2
);
ConsoleReader console = new ConsoleReader();
console.addCompleter(completer3);
while (true) {
String line = console.readLine("8> ");
if (line.isEmpty()){
console.println();
}
}
Any ideas how to fix this?