feat(complete): complete sigil-prefixed positionals - #1319
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
5110a33 to
bcfbb7d
Compare
bcfbb7d to
25838cc
Compare
25838cc to
e469a24
Compare
5609fce to
9b1f823
Compare
683bbed to
ace249e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ace249e. Configure here.
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes. Shadow comparisonParsing
|
de4484b to
6f6f260
Compare
6f6f260 to
5c3c3a1
Compare

Summary
Stack
Test plan
AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.
Note
Medium Risk
Touches shared completion routing in argv and the CLI completer; mistakes could mis-classify cursor position or leak incorrect file fallbacks, but behavior is heavily covered by new tests.
Overview
Tab completion now treats sigil-prefixed positionals (e.g.
+node@22) as their own cursor position: the declared prefix is stripped for matching against choices, completers, and runtime overlays, then re-applied on every candidate—the same behavior inusage-argvand thecomplete_wordCLI path.Boundary rules align with parsing: sigil matching is disabled after
--, when a restart token (:::) was already seen, while a flag is awaiting a value, or after anautomaticdouble_dashargument has started its trailing segment—so tokens like-- +nstay ordinary positionals. Sigil-shaped tokens also suppress cwd/file shell fallback when the field is a closed choice set.Adds sigil reference docs, an example KDL spec, and tests covering choices, separators, restart, and async overlays.
Reviewed by Cursor Bugbot for commit 5c3c3a1. Bugbot is set up for automated code reviews on this repo. Configure here.