FZF is a fuzzy finder that can be used to autocomplete and find stuff at the shell. It has a beautiful ncurses interface, sensible keybindings and is blazing fast. It truly supercharges your shell use and you will not be able to live without it after.
- To install FZF and install its hooks into Bash, Zsh and Fish shells:
$ git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf $ ~/.fzf/install
- Find files and directories: At the shell prompt, press Ctrl+T and FZF scans the files and directories inside your current directory and starts filling up its list. Type a few characters of the file or directory you want to autocomplete. The characters do not need to be an exact substring. That is the fuzzy feature of this finder. Use up and down keys to navigate the list. You can even use the mouse to pick items from the list by clicking and Ctrl-clicking. Finally press Enter to pick the entry you want. Press Esc to dismiss FZF any point.
Find directories: At the shell prompt, press Alt+C to autocomplete and find only directories. The rest of the interaction is same as that for Ctrl+T shown above.
Find from history: Ctrl+R does the fuzzy finding for commands from your shell history. This works in Bash, but seems to be disabled in Fish. No worries cause Fish already has powerful history search.
Find process to kill: Figuring out the PID of a process you want to kill is painful. With FZF, all you need to do is type kill, press TAB and you get a list of processes with full details. You can type some characters to find the process you want or scroll the list. For each item, it also shows the full command line at the bottom, enabling you choose the right program to kill. Press Enter to choose the process. Its PID will be added to your kill command.
Tried with: FZF 0.17.1 and Ubuntu 16.04