fix(completions): rebuild compinit after managed changes#350
Closed
ss-o wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
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 invokingcompinit. - When
.zi-compinitis invoked in the internal “forced refresh” mode ($1 = 1), strip-Cfrom the user-provided compinit options and ensure the function does not add-Cvia its internaluse_Cflag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/ GitHubzi#349.Prior verification before closure
zsh -n lib/zsh/install.zshzsh -n zi.zshcompinitprobe:.zi-compinit 1withZI[COMPINIT_OPTS]="-C -i"passed-d <dump> -iand did not pass-C.compinitprobe:.zi-compinitwithZI[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-4for future evaluation alongsidezi#349.