fix(cli): emit one completion candidate per flag — collapse multi-line descriptions and restore --no-* text - #472
Conversation
…e descriptions and restore --no-* text install's multi-line arg descriptions were leaking each continuation line as its own bogus candidate through `complete -- install --`; the three --no-* root flags showed a meaningless stripped-key description instead of their real text because @gunshi/plugin-completion resolves a no-* key's description by looking up the base key, which doesn't exist for these.
…eir own candidates forCompletion injects a positional phantom under each --no-* flag's stripped key (e.g. color) purely so the completion plugin's description lookup finds it — nothing else pinned that it stays excluded from the candidate list, so a future gunshi/bomb.sh bump treating positionals as options would leak --color/--animation/--suppressions silently.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe CLI completion adapter now produces normalized, valid candidates for positional and option arguments. It handles hidden entries and negated flags without exposing phantom candidates. Tests verify install completion output and a patch changeset documents the fixes. ChangesCLI completion metadata corrections
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Two protocol-level bugs in the new shell completion (#456), both reproduced end to end on the built binary:
Tests: two new in-process candidate-protocol tests (TDD-red proven via stash). Changeset: `svelte-vitals` patch. Plan: `plans/049-completion-candidate-stream.md` (advisor session 2026-08-12).
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
--no-*.Tests
Chores
svelte-vitals.