Skip to content

fix: ignore extra tools.cli keys when generating completions - #71

Merged
hlship merged 1 commit into
mainfrom
hlship/260903-completions-opt-arity
Sep 3, 2026
Merged

fix: ignore extra tools.cli keys when generating completions#71
hlship merged 1 commit into
mainfrom
hlship/260903-completions-opt-arity

Conversation

@hlship

@hlship hlship commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Completions applied the full tools.cli option spec to a 3-arg helper, which threw ArityException when extra keys (:id, :parse-fn, :validate, …) were present (#70).
  • to-opt now takes the spec vector and uses only short option, long option, and summary.
  • Extended the tool-options completions test so extra keys would have failed before this change.

Test plan

  • clj -X:test :nses '[net.lewisship.cli-tools.completions-test]' :patterns '["completions"]'
  • Run completions on a tool that defines :extra-tool-options with extra tools.cli keys and confirm it writes a script instead of aborting.

@hlship hlship self-assigned this Sep 3, 2026
@hlship hlship added the bug Something isn't working label Sep 3, 2026
@hlship hlship added this to the 1.0.2 milestone Sep 3, 2026
@hlship
hlship marked this pull request as ready for review September 3, 2026 17:54
@hlship
hlship merged commit 6c195ae into main Sep 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant