spring-projects/spring-shell

After upgrade spring-shell from 2.0.1 to 2.1.x then to 3.3.x Tab Completion not working anymore

joanneshen opened this issue · 2 comments

Not sure if anyone reported this before.

Before we upgraded spring-shell to 2.1.x (backward-incompatible one), we used to apply the following for tab completion:
public static class CustomCompleterAdapter extends CompleterAdapter {
@OverRide
public void complete(LineReader reader, ParsedLine line, List candidates) {
List oldCandidates = new ArrayList<>();
super.complete(reader, line, oldCandidates);
......// construct candidates based on oldCandidates
}

@bean
public CompleterAdapter myCompleter() {
CompleterAdapter result = new CustomCompleterAdapter();
result.setShell(shell);
return result;
}

However, after upgrade this is partially broken, which means the completion for command seemed fine, but not for the arguement. Any alternative way to use this kind of generic way to achieve tab completion?
In the meantime also try to use the way of annotating ValueProvider for command options, but that is also not fully working (refer to issue #923).

Spring Shell 2.1.x has been out of support since 2023-11-28.
If you are on Commercial support please log a ticket via the customer support desk.
I suggest you upgrade to at least 3.2.x or later.

Sorry, I should have said that that the system is migrated/upgraded to spring-shell 3.3.3. Still the same issue. Thanks!