diff --git a/home/dot_config/fish/conf.d/00-fzf-override.fish.tmpl b/home/dot_config/fish/conf.d/00-fzf-override.fish.tmpl new file mode 100644 index 0000000..ad620ad --- /dev/null +++ b/home/dot_config/fish/conf.d/00-fzf-override.fish.tmpl @@ -0,0 +1,17 @@ +# Override fzf.fish default bindings before it loads +# This file loads before fzf.fish (alphabetically) to prevent CTRL+R binding +# We want Atuin to handle CTRL+R instead of fzf + +# Store the original fzf_configure_bindings function +functions -c fzf_configure_bindings _fzf_configure_bindings_original 2>/dev/null + +# Override with our version that disables history binding +function fzf_configure_bindings --wraps=_fzf_configure_bindings_original + # If called without arguments (from fzf.fish), add --history= to disable CTRL+R + if test (count $argv) -eq 0 + _fzf_configure_bindings_original --history= + else + # Otherwise pass through arguments as-is + _fzf_configure_bindings_original $argv + end +end diff --git a/home/dot_config/fish/conf.d/modify_fzf.fish.tmpl b/home/dot_config/fish/conf.d/modify_fzf.fish.tmpl deleted file mode 100755 index 5334bcb..0000000 --- a/home/dot_config/fish/conf.d/modify_fzf.fish.tmpl +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bun - -// Modify fzf.fish to disable default CTRL+R binding (allow Atuin to handle it) -// This is a chezmoi modify_ script that processes fzf.fish on every apply - -const content = await Bun.stdin.text(); -const lines = content.split('\n'); - -// Find and comment out the standalone fzf_configure_bindings call -const targetLineRegex = /^(\s*)fzf_configure_bindings\s*$/; - -const modifiedLines = lines.map(line => { - if (targetLineRegex.test(line) && !line.trim().startsWith('#')) { - const indent = line.match(/^(\s*)/)?.[1] || ''; - return `${indent}# fzf_configure_bindings # Disabled - configured in config.fish instead`; - } - return line; -}); - -console.log(modifiedLines.join('\n')); diff --git a/home/run_after_fisher-update.sh.tmpl b/home/run_onchange_after_fisher-update.sh.tmpl similarity index 100% rename from home/run_after_fisher-update.sh.tmpl rename to home/run_onchange_after_fisher-update.sh.tmpl