Open jvalkeal opened 1 year ago
I'm leaning towards this being a documentation issue. If manually creating command registrations and then registering those into a catalog where a past beyond a point where shell core can modify given registrations. Currently how these global help options work is that a singleton global instance of a registration builder is prepared for help options and user can choose or not to choose to use it.
For example in samples and how it's documented is that you autowire CommandRegistration.BuilderSupplier
which is a global singleton which already knows about these prepared customisations.
Reference for this is this commit from spring-cli https://github.com/spring-projects-experimental/spring-cli/commit/cf6cb3b37de05f602aef29672e2df606f93e3bd1
If registering
CommandRegistration
into a catalog without defining help options like what happens here:https://github.com/spring-projects/spring-shell/blob/25d249c28dfa37447a3e88bb699afafd3c52107d/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/CommandCatalogAutoConfiguration.java#L72-L76
that command obviously will not get customised. Should find a good way to also customise dynamic commands.