fix(keybinds): guard bindings on required binaries and fix fzf compat #16
Reference in New Issue
Block a user
Delete Branch "fix/fzf-keybind-guards"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two categories of fixes, both motivated by compatibility with older fzf builds (e.g. fzf 0.60 devel on the home server).
Binary guards for optional tools
Keybindings that depend on optional tools are now only registered when those tools are present in
PATH. Previously, pressing the key on a machine without the tool would error rather than silently do nothing.conf.d/fzf.fishfzf_configure_bindingsiffzfis not in PATHconf.d/key_bindings.fishtype -q qalcfunctions/_qalc_eval.fishqalcis absentfunctions/_smart_execute.fish_qalc_evalreturns 1fzf version compatibility for
fzf-history-widgetSeveral options used in
integrations/fzf.fishwere added after fzf 0.60. The fzf version is detected once at shell startup insidefzf_key_bindingsand captured intofzf-history-widgetvia--inherit-variable. All newer-only options are gated behind a singleif test "$_fzf_transform_action" = bg-transformblock.transform(sync)bg-transform(non-blocking)wrapwrap-word--preview-wrap-sign="↳ "alt-r:toggle-rawManual Verification Checklist
150 * 1.08and press Ctrl+Alt+= — result printed, buffer clears. Type2+2=and press Ctrl+Enter — result printed.*=-ending buffer executes the line normally.unknown actionorunknown optionerrors in stderr.