Summary
The Bash completion generated by:
seed4j completion bash --install
currently completes module slugs for seed4j apply because each visible module is registered as a Picocli subcommand.
In seed4j apply-set, module slugs are repeated positional arguments rather than subcommands. The current completion generator does not collect positional completion candidates, so this command does not suggest modules:
Expected behavior
The generated Bash completion should suggest visible module slugs for every module position:
Example suggestions:
init maven-java prettier spring-boot
It should also filter suggestions by the current prefix:
seed4j apply-set init mav<TAB>
Expected suggestion:
Modules already selected in the same command should not be suggested again because duplicate slugs are invalid. Hidden modules must never be suggested.
Generic apply-set options should remain available alongside module suggestions, and option value completion must continue working.
Implementation notes
- Expose the visible module slugs through the module-set planning boundary.
- Register those slugs as completion candidates for the repeated positional parameter.
- Extend
BashCompletionScriptGenerator to collect positional candidates separately from subcommand candidates.
- Do not treat positional module slugs as command-path segments. After parsing
apply-set init, the active command path must remain apply-set.
- Generate completion data statically, consistently with the existing
apply completion. Users may regenerate the completion script when the runtime module catalog changes.
Acceptance criteria
seed4j apply-set <TAB> suggests visible module slugs.
- Prefix filtering works for positional module slugs.
- Completion continues suggesting modules after one or more modules have already been entered.
- Already selected modules are not suggested again.
- Hidden modules are not suggested.
- Module slugs are not interpreted as subcommands by the completion script.
apply-set options remain available during completion.
- Existing option value completion continues working.
- Existing completion behavior for
seed4j apply <module> remains unchanged.
- The behavior is covered by generated-script integration tests, not only by assertions against script text.
Summary
The Bash completion generated by:
currently completes module slugs for
seed4j applybecause each visible module is registered as a Picocli subcommand.In
seed4j apply-set, module slugs are repeated positional arguments rather than subcommands. The current completion generator does not collect positional completion candidates, so this command does not suggest modules:Expected behavior
The generated Bash completion should suggest visible module slugs for every module position:
Example suggestions:
It should also filter suggestions by the current prefix:
Expected suggestion:
Modules already selected in the same command should not be suggested again because duplicate slugs are invalid. Hidden modules must never be suggested.
Generic
apply-setoptions should remain available alongside module suggestions, and option value completion must continue working.Implementation notes
BashCompletionScriptGeneratorto collect positional candidates separately from subcommand candidates.apply-set init, the active command path must remainapply-set.applycompletion. Users may regenerate the completion script when the runtime module catalog changes.Acceptance criteria
seed4j apply-set <TAB>suggests visible module slugs.apply-setoptions remain available during completion.seed4j apply <module>remains unchanged.