flake-update-20260505
1# FZF — cached init to avoid fork on every startup
2has fzf || return
3[[ $options[zle] = on ]] || return
4
5local cache=${XDG_CACHE_HOME:-$HOME/.cache}/zsh/fzf-init.zsh
6local bin=$(realpath ${commands[fzf]})
7
8# Regenerate if cache is missing, binary is newer, or the resolved
9# path changed (e.g. nix store path updated without timestamp change)
10if [[ ! -f $cache || $bin -nt $cache ]] || ! grep -qF "$bin" "$cache" 2>/dev/null; then
11 mkdir -p ${cache:h}
12 fzf --zsh > "$cache"
13 _zsh_compile_if_needed "$cache"
14fi
15source "$cache"