[improve][cli] Pulsar shell: fix custom commands autocompletion
@@ -230,9 +230,11 @@ public class PulsarAdminTool {
jcommander.addCommand(c.getKey(), c.getValue().getConstructor(Supplier.class).newInstance(admin));
} else {
// Other mode, all components are initialized.
+ if (c.getValue() != null) {
jcommander.addCommand(c.getKey(), c.getValue().getConstructor(Supplier.class).newInstance(admin));
}
}
+ }
protected boolean run(String[] args) {
final Function<PulsarAdminBuilder, ? extends PulsarAdmin> adminFactory = createAdminFactory(args);
