@CommandDefinition(name = "test2", description = "") public static class CommandTest7a implements Command { @Argument(completer = ArgumentQuoteCompleter.class) private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "display", description = "") public class DisplayCommand implements Command { @Argument private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { if (arg != null) { commandInvocation.println(arg); return CommandResult.SUCCESS; } return CommandResult.FAILURE; } }
@CommandDefinition(name = "test", description = "") public static class CommandTest4 implements Command { @Option(shortName = 'r', activator = Test4Activator.class) private String required; @Argument(completer = Arg4Completer.class) private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "test", description = "") public static class CommandTest4C implements Command { @Option(shortName = 'r', hasValue = false) private boolean required; @Argument(activator = Test4ActivatorB.class, completer = Arg4Completer.class) private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "test", description = "a simple test6") public class ParseCompleteTest6<CI extends CommandInvocation> extends TestCommand<CI> { @Option(description = "define properties") private String define; @Argument(completer = ArgTestCompleter.class) private String arg; }
@CommandDefinition(name = "test", description = "") public static class CommandTest10 implements Command { @Option private String bar; @Argument private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "test", description = "a simple test4") public class ParseSpaceTest<CI extends CommandInvocation> extends TestCommand<CI> { @Option(shortName = 'r', activator = Test4Activator.class) private String required; @Argument(completer = SpaceArgumentCompleter.class) private String arg; }
@CommandDefinition(name = "test", description = "") public static class ValidatorOptionCommand implements Command { @Option(required = true) private String foo; @Argument private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "test", description = "") public static class CommandTest9 implements Command { @Option(name = "foo\\ bar", completer = FooBarCompleter.class) private String bar; @Argument private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "test", description = "") public static class CommandTest4B implements Command { @Option(shortName = 'r') private String required; @Argument(activator = Test4ActivatorB.class, completer = Arg4Completer.class) private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "test", description = "") public static class CommandTest8 implements Command { @Option private String bar; @Argument private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@GroupCommandDefinition(name = "groupfail", description = "", groupCommands = {ChildTest1.class}) public class GroupFailCommand<CI extends CommandInvocation> implements Command<CI> { @Option private String foo; @Argument private String bar; @Override public CommandResult execute(CI commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "test", description = "a simple test4") public class ParseCompleteTest4<CI extends CommandInvocation> extends TestCommand<CI> { @Option(shortName = 'r', activator = Test4Activator.class) private String required; @Argument private String arg; }
@CommandDefinition(name = "arg2", description = "") public static class Arg2Command implements Command { @Option private boolean bool; @Option(completer = InputTestCompleter.class) private String input; @Argument(completer = ArgTestCompleter.class) private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "arg", description = "") public static class ArgCommand implements Command { @Option private boolean bool; @Option(completer = InputTestCompleter.class) private String input; @Argument(completer = ArgTestCompleter.class) private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "foo", description = "") public static class FooCommand implements Command { @Option private boolean bool; @Option(completer = InputTestCompleter.class) private String input; @Argument(completer = ArgTestCompleter.class) private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } }
@CommandDefinition(name = "arg", description = "") public static class ArgCommand implements Command { @Option private boolean bool; @Option(completer = InputTestCompleter.class) private String input; @Argument(completer = ArgTestCompleter.class) private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { commandInvocation.println("hello aesh!"); return CommandResult.SUCCESS; } }
@CommandDefinition(name = "req", description = "") public static class ReqCommand implements Command { @Option(name = "reset-configuration", hasValue = true, required = true) private boolean resetConfiguration; @Option private String foo; @Argument private String arg; @Override public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException { return CommandResult.SUCCESS; } } }
@CommandDefinition(name = "test", description = "a simple test3") public class ParseCompleteTest5<CI extends CommandInvocation> extends TestCommand<CI> { @Option(shortName = 'X', description = "enable X") private String X; @OptionList(shortName = 'v', name = "value", valueSeparator = ':') private List<String> values; @Option(shortName = 'b', hasValue = false) private boolean bool; @Option(shortName = 'D', description = "define properties", required = true) private String define; @Argument(completer = ArgTestCompleter.class) private String arg; }
@CommandDefinition(name = "test", description = "a simple test3") public class ParseCompleteTest3<CI extends CommandInvocation> extends TestCommand<CI> { @Option(shortName = 'X', description = "enable X") private String X; @OptionList(shortName = 'v', name = "value", description = "enable equal", completer = ValueTestCompleter.class) private List<String> values; @Option(shortName = 'b', hasValue = false) private boolean bool; @Option(shortName = 'D', description = "define properties", required = true) private String define; @Argument(completer = ArgTestCompleter.class) private String arg; }