Skip to content

Comments

Fix dynamic completions (regression)#99

Merged
DannyBen merged 3 commits intomasterfrom
fix/dynamic-completions
Feb 20, 2026
Merged

Fix dynamic completions (regression)#99
DannyBen merged 3 commits intomasterfrom
fix/dynamic-completions

Conversation

@DannyBen
Copy link
Member

@DannyBen DannyBen commented Feb 19, 2026

cc #96

Summary

This PR fixes a regression introduced in v0.7.4 where dynamic completions like $(...) were collapsed into a single malformed completion token.

What Changed

  • Fixed dynamic completion serialization in Pattern so dynamic $(...) entries are handled separately from literal words.
  • Kept the v0.7.4 escaping behavior for literal completions with spaces/quotes.
  • Added marker-based handling in the generated template filter to split dynamic command output into completion candidates.
  • Centralized the dynamic marker value in Completely::Pattern::DYNAMIC_WORD_PREFIX and consumed it from ERB.

Tests and Validation

  • Added integration coverage for mixed dynamic + literal completion behavior.
  • Confirmed generated script remains:
    • shellcheck compliant
    • shfmt compliant
  • Verified manual repro flow with completely test "cli ".

Docs / Developer Experience

  • Added AGENTS.md guidance for this repo.
  • Added :script_quality spec tag for shellcheck/shfmt checks.
  • Updated spec/README.md to recommend respec and document quick commands.

@DannyBen
Copy link
Member Author

This is available as a pre-release (0.8.0.rc1) on RubyGems:

gem install completely --pre

@DannyBen DannyBen mentioned this pull request Feb 20, 2026
@DannyBen DannyBen merged commit 8945d73 into master Feb 20, 2026
6 checks passed
@DannyBen DannyBen deleted the fix/dynamic-completions branch February 20, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant