[ https://issues.apache.org/jira/browse/IGNITE-19949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Gagarkin updated IGNITE-19949: ----------------------------------- Description: Completers don't work when they have different commands but the same option {code:java} @Test void sameOptionDifferentCompleters() { // Given registry.register( CompleterConf.builder() .command("command", "subcommand") .enableOptions("--to") .exclusiveEnableOptions().build(), words -> completer1 ); registry.register( CompleterConf.builder() .command("command", "subcommand") .enableOptions("--to") .exclusiveEnableOptions().build(), words -> completer2); // Then assertThat(registry.findCompleters(words("command", "subcommand", "--to")), containsInAnyOrder(completer1)); // And assertThat(registry.findCompleters(words("command", "subcommand", "--to")), containsInAnyOrder(completer2)); } {code} was: Completers don't work when they have different commands but the same option {code:java} @Test void sameOptionDifferentCompleters() { // Given registry.register( CompleterConf.builder() .command("command", "subcommand") .enableOptions("--to") .exclusiveEnableOptions().build(), words -> completer1 ); registry.register( CompleterConf.builder() .command("command", "subcommand") .enableOptions("--to") .exclusiveEnableOptions().build(), words -> completer2); // Then assertThat(registry.findCompleters(words("command", "subcommand", "--to")).var, containsInAnyOrder(completer1)); // And assertThat(registry.findCompleters(words("command", "subcommand", "--to")), containsInAnyOrder(completer2)); } {code} > Completers don't work properly in case of when different completers have the > same action option > ----------------------------------------------------------------------------------------------- > > Key: IGNITE-19949 > URL: https://issues.apache.org/jira/browse/IGNITE-19949 > Project: Ignite > Issue Type: Bug > Components: cli > Reporter: Ivan Gagarkin > Priority: Major > Labels: ignite-3 > > Completers don't work when they have different commands but the same option > {code:java} > @Test > void sameOptionDifferentCompleters() { > // Given > registry.register( > CompleterConf.builder() > .command("command", "subcommand") > .enableOptions("--to") > .exclusiveEnableOptions().build(), > words -> completer1 > ); > registry.register( > CompleterConf.builder() > .command("command", "subcommand") > .enableOptions("--to") > .exclusiveEnableOptions().build(), > words -> completer2); > // Then > assertThat(registry.findCompleters(words("command", "subcommand", > "--to")), containsInAnyOrder(completer1)); > // And > assertThat(registry.findCompleters(words("command", "subcommand", > "--to")), containsInAnyOrder(completer2)); > } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)