fix(zsh): init fzf before completion styles#33
Merged
Conversation
PR #31 moved fzf init into tools.zsh (sourced last, after the prompt) so zoxide could initialise at end. But fzf's `fzf --zsh` registers completions via compdef and must run before completions.zsh, so sourcing it last produced a silent completion error. Split fzf into its own fzf.zsh, sourced after compinit (plugins.zsh) and before completions.zsh (step 5b). zoxide stays in tools.zsh at the end where Oh My Posh's hook rewrite no longer displaces it.
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.
Problem
PR #31 moved fzf init into
tools.zsh(sourced last, after the prompt) so zoxide could initialise at the end of the config. That fixed the visiblezoxide doctorwarning — but introduced a silent error:fzf --zshregisters completions viacompdefand must run beforecompletions.zsh. Sourcing it last broke fzf completion silently.Fix
Split the two integrations:
fzf.zsh(new) — fzf init only. Sourced at step 5b inindex.zsh: after compinit (plugins.zsh), beforecompletions.zsh.tools.zsh— now zoxide only, still sourced last (step 10) so Oh My Posh's hook-array rewrite doesn't displace zoxide'sprecmd/chpwdhook.Notes
zshpackage — no status-block change needed.stow --dir=stow/common --target="$HOME" zshrestow to linkfzf.zshinto $HOME (per-file symlinks).