How to use FZF in Pry console for search command history
FZF is a amazing tool for command-line fuzzy search, the feature that I used mostly every day is searching command history in zsh by hit ctrl + r. And I love pry too, I spent a lots time in pry every day of work, but I can not find any way to use fzf in pry console, so I found a way to make fzf works in pry by myself. It’s quite simple.
gem install rb-readline
Then add this to your ~/.pryr
def RbReadline.rl_reverse_search_history(sign, key)
rl_insert_text `cat ~/.pry_history | fzf --tac | tr '\n' ' '`
Then open your pry, and hit ctrl + r, it works right ? :), and you can hit ctrl + p/n, to move to previous/next command.
If you are a rails developer , your may need add this gem to your Gemfile