You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The below mixture of 1 parent command with 1 sub-command with aliases fails to recognize subcommand aliases properly.
INPUT:cb t
Expected output:
Running Collabbook main command!
Create task
Actual output:
Unmatched argument: t
Usage: cb [-hV] [COMMAND]
Collaborate on tasks in your git repo from the terminal.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
task Create task
note Create note
MWE
@Command(description="Collaborate on tasks in your git repo from the terminal.",
name="cb", mixinStandardHelpOptions = true, version="")
public class Collabbook implements Callable<Void> {
public static void main(String[] args) {
CommandLine cmd = new CommandLine(new Collabbook())
.addSubcommand("task", new CreateTask());
List<Object> result = cmd.parseWithHandler(new RunAll(), args);
}
@Override
public Void call() throws Exception {
System.out.println("Running Collabbook main command!");
return null;
}
}
@Command(description="Create task", name="task", aliases={"t"})
public class CreateTask implements Callable<Void> {
@Override
public Void call() {
System.out.println("Create task");
return null;
}
}
The text was updated successfully, but these errors were encountered:
The below mixture of 1 parent command with 1 sub-command with aliases fails to recognize subcommand aliases properly.
INPUT:
cb t
Expected output:
Actual output:
MWE
The text was updated successfully, but these errors were encountered: