3

FZF is a lovely tool, the main issue I have is that the commands I end up running with it don't end up in my bash history.

Let's say I do this

history | fzf

And I choose a command I ran recently, say echo "hello". When I then go through my bash history, my most recently run command isn't echo "hello", it's history | fzf. This means that I have to re-run the entire history | fzf and find the same echo "hello" command if I want to run it again.

Is there a way to force my selected command that I got by using fzf into my bash history?

John Allard
  • 1,318
  • 1
  • 14
  • 23
  • 1
    Does using `Ctrl+r` not do this already? In mine `Ctrl+r` launches fzf on my history, and pressing enter on some old item pastes it to the terminal - if I run that command by pressing enter, then it shows up as the last item in the history – mattb May 19 '21 at 08:52

0 Answers0