Closed nkh closed 1 year ago
The former.
Any idea why I get the later? Probably something in my config, I digged around but can't find a reason.
I'm working on another solution using tmux bind and tmux set/paste-buffer that's more generic, and I already use forgit, I'll post a link to a gist if you are interested.
No clue. You on zsh? You might want to try it on bash and see if it works there.
I don't use zsh. I just sourced the file.
Then you can bash --rcfile fzf-git.sh
and see if it works without other stuff.
That worked, now I have a point where I can start debugging, thanks.
Here's how I do the same thing as with your bindings.
$> tmux bind -n C-g bind -n C-h popup -w 80% -h 80% -E -d $PWD "./tmux-insert"
tmux-insert:
buffer=fd --color always | fzf -m --ansi --cycle | quote_lines | tr '\n' ' '
[[ "$buffer" ]] && { tmux set-buffer "$buffer" ; tmux paste-buffer ; }
This uses tmux for the bindings and gives the flexibility to run whatever one wants. The only thing that I haven't worked out yet is how to run commands that themselves use tmux windows (my file manager does), I hope to fix that.
Are the bindings supposed to immediately open a tmux window or are they supposed to add, eg,
_fzf_git_hashes
to the command line and to be run as a part of the command?I get the later behavior but expected the former.