-
Notifications
You must be signed in to change notification settings - Fork 393
Closed as not planned
Description
As of v3.4, creating an alias for a command is done as follows:
CommandRegistration commandRegistration() {
return CommandRegistration.builder()
.command("mycommand")
// define alias as myalias
.withAlias()
.command("myalias")
.and()
// define alias as myalias1 and myalias2
.withAlias()
.command("myalias1", "myalias2")
.and()
.build();
}The DSL methods command("alias").and() are repetitive. I suggest to shorten them as follows:
CommandRegistration commandRegistration() {
return CommandRegistration.builder()
.command("mycommand")
// define a single alias
.withAlias("myalias")
// or define multiple ones at once
.withAlias("myalias1", "myalias2")
.build();
}Metadata
Metadata
Assignees
Labels
No labels