Skip to content

fix(zsh): init fzf before completion styles#33

Merged
fnayou merged 1 commit into
mainfrom
fix/fzf-init-before-completions
Jun 24, 2026
Merged

fix(zsh): init fzf before completion styles#33
fnayou merged 1 commit into
mainfrom
fix/fzf-init-before-completions

Conversation

@fnayou

@fnayou fnayou commented Jun 24, 2026

Copy link
Copy Markdown
Owner

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 visible zoxide doctor warning — but introduced a silent error: fzf --zsh registers completions via compdef and must run before completions.zsh. Sourcing it last broke fzf completion silently.

Fix

Split the two integrations:

  • fzf.zsh (new) — fzf init only. Sourced at step 5b in index.zsh: after compinit (plugins.zsh), before completions.zsh.
  • tools.zsh — now zoxide only, still sourced last (step 10) so Oh My Posh's hook-array rewrite doesn't displace zoxide's precmd/chpwd hook.

Notes

  • New file in existing zsh package — no status-block change needed.
  • Requires stow --dir=stow/common --target="$HOME" zsh restow to link fzf.zsh into $HOME (per-file symlinks).

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.
@fnayou fnayou merged commit 5737541 into main Jun 24, 2026
2 checks passed
@fnayou fnayou deleted the fix/fzf-init-before-completions branch June 24, 2026 02:35
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