fix(fzf): erase fzf bindings in config.fish when fzf is absent

conf.d/fzf.fish is owned by Fisher and gets restored to the plugin's
original on fisher update, so any guard placed there is unreliable.
config.fish is never touched by Fisher, making it the right place to
call _fzf_uninstall_bindings after conf.d has already run and set up
the fzf key bindings on machines where fzf is not installed.
This commit is contained in:
2026-05-18 21:06:09 -04:00
parent a442315312
commit 46be262f92
+10
View File
@@ -117,6 +117,16 @@ if status is-interactive
source "$__fish_config_dir/integrations/fzf.fish" source "$__fish_config_dir/integrations/fzf.fish"
end end
# ─────────────────── Remove fzf bindings when fzf is absent ─────────────
# conf.d/fzf.fish is managed by Fisher and may be restored on fisher update,
# so this is the reliable place to prevent fzf key bindings from being set
# on machines where fzf is not installed.
if not type -q fzf
if functions -q _fzf_uninstall_bindings
_fzf_uninstall_bindings
end
end
# ──────────────────────────────── DirENV ──────────────────────────────── # ──────────────────────────────── DirENV ────────────────────────────────
# Tool to handle automatic environment loading in directories and their children # Tool to handle automatic environment loading in directories and their children
# Use when children need to load venv as well. # Use when children need to load venv as well.