📑Tab completer

Tab completer in parent commands is optional.

To add a tab completer override method getTabCompleter in the parent command class

@Override
public BaseTabCompleter getTabCompleter() {
    return new MyCommandTabCompleter(this);
}

How to create a tab completer class?

Every sub-command is automatically added to the tab completer, you can define other conditions

public class MyCommandTabCompleter extends BaseTabCompleter {

    public MyCommandTabCompleter(ParentCommand parentCommand) {
        super(parentCommand);

        this.addConditions((sender, args) -> {
            List<String> completions = new ArrayList<>();

            if (args.length == 2) {
                completions.addAll(Arrays.asList("test1", "test2"));
            }
             
            return completions;
        });
    }
}