Intake icon indicating copy to clipboard operation
Intake copied to clipboard

Add support for custom command completion in the annotation method of command registration

Open EDawg878 opened this issue 11 years ago • 0 comments

This fork is tested and verified to be working, it does not break previous versions of Intake.

Example Usage:

ParametricBuilder builder = new ParametricBuilder();
builder.addCompleter(new ExampleCommand());
public class ExampleCommand implements CommandCompleter {

  @Command(aliases="example", desc="example", completer=ExampleCommand.class)
  public void example() {
     //example command
  }
  @Override
  public List<String> getSuggestions(String arguments, CommandLocals locals) throws CommandException {
    // add custom command completion implementation
  }
}

EDawg878 avatar Jan 02 '15 06:01 EDawg878