Skip to content

fix(completions): rebuild compinit after managed changes#350

Closed
ss-o wants to merge 1 commit into
nextfrom
bug-zsh4-completion-refresh
Closed

fix(completions): rebuild compinit after managed changes#350
ss-o wants to merge 1 commit into
nextfrom
bug-zsh4-completion-refresh

Conversation

@ss-o

@ss-o ss-o commented May 27, 2026

Copy link
Copy Markdown
Member

Closed by maintainer direction

This PR is closed unmerged. Zi changes require major refactoring and should not be applied as a narrow code patch right now.

The completion-refresh observation should be kept only as future evaluation/tracker context under Linear ZSH-4 / GitHub zi#349.

Prior verification before closure

  • zsh -n lib/zsh/install.zsh
  • zsh -n zi.zsh
  • Fake-compinit probe: .zi-compinit 1 with ZI[COMPINIT_OPTS]="-C -i" passed -d <dump> -i and did not pass -C.
  • Fake-compinit probe: .zi-compinit with ZI[COMPINIT_OPTS]="-C -i" still passed -d <dump> -C -i.

Agent handoff

Status: Closed unmerged by maintainer direction.
Current state: Treat this as future design input only, not an implementation PR.
Blockers: Zi requires major refactoring before targeted completion-refresh changes should be applied.
Next steps: Keep the behavior and possible approach in Linear ZSH-4 for future evaluation alongside zi#349.

Copilot AI review requested due to automatic review settings May 27, 2026 00:37
@ss-o ss-o requested a review from a team as a code owner May 27, 2026 00:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Zi’s internal completion refresh behavior so that when managed completions are installed/removed/enabled/disabled and Zi triggers an internal .zi-compinit 1, it always rebuilds compinit state even if the user has configured ZI[COMPINIT_OPTS] to include -C (reuse existing dump).

Changes:

  • Parse ZI[COMPINIT_OPTS] into an array for controlled manipulation before invoking compinit.
  • When .zi-compinit is invoked in the internal “forced refresh” mode ($1 = 1), strip -C from the user-provided compinit options and ensure the function does not add -C via its internal use_C flag.

@ss-o ss-o closed this May 27, 2026
@ss-o ss-o deleted the bug-zsh4-completion-refresh branch May 27, 2026 00:42
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.

2 participants