In this post, I will show what we can do, how to install and a couple of usages.

What We Can Do with fzf

In the following gif, I tried history first then I used h | fzf (h is an alias of history). As you can see, you can find out the command you want to see easily with fzf.
fzf allows us to use git checkout interactively like below.
In addition, you can customize commands with fzf and many people write scripts. In the bottom of this post, I put the link which is very useful for people who want to try fzf. You can also set shortcut keys.

Install

This post supports MacOS and Ubuntu since I have used both of them.

# MacOS$ brew install fzf
# Ubuntu$ sudo apt-get install fzf

If you are using Windows, I highly recommend you to start using chocolatey(https://chocolatey.org/) which is a package manager software.

Simple Usage

File search

I did this command in my Gatsby site folder and searched my components.

$ fzf
$ fzf --reverse

History search

This is very useful to me since I usualy do h | grep 'something' for checking commands I typed before.

$ history | fzf
$ history | fzf --reverse

If you add --reverse you can change the layout like this(maybe better)

It is worth mention that fzf comes with a few handy functions to search the command history and also directories. You just need find and source the fzf/key-bindings.bash file (there is also one for zsh and fish). More info about it here.