I thought I could search from ripgrep with fzf-tmux by adapting the script “frf” by replacing tmux by fzf-tmux :
#!/usr/bin/env bash
# 1. Search for text in files using Ripgrep
# 2. Interactively narrow down the list using fzf
# 3. Open the file in Vim
rg --color=always --line-number --no-heading --smart-case "${*:-}" |
fzf-tmux --ansi \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--delimiter : \
--preview 'batcat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(kak {1} +{2})'
And call it with :
map global user -docstring 'open fuzzy grep finder (TMUX)' g ': edit %sh{frf -}<ret>'
But I don’t know how to adapt the end of “frf” script to open in already kakoune session and not trying to open new kak from terminal ?