Posts

Showing posts with the label fzf

How to get similar behaviour like the default CTRL+T binding in fzf with a custom search command?

How to get similar behaviour like the default CTRL+T binding in fzf with a custom search command? This question is (presumably) about bash and readline keybindings and how to customize them. I would like to create an alias like this: alias listvids="rg -g '*.{mkv,mp4,ogv}' --files 2> /dev/null | fzf to list certain video files in the current directory tree and pipe the input to fzf for fuzzy searching the results, which does work. fzf But then I would like the command to act "the same as" the default CTRL-T binding defined in ~/.fzf/shell/keybindings/key-bindings.bash , meaning it should paste the selected path from the fzf list into the command line when hitting enter. ~/.fzf/shell/keybindings/key-bindings.bash With the above command, when I hit enter on a path, it just gets echoed at the command line but does not get inserted into the prompt. I tried something like alias listvids="rg -g '*.{mkv,mp4,ogv}' --files 2> /dev/null | fzf --bind=ctr...