FZF is a fuzzy finder that can be used to quickly find and autocomplete file/directory paths, items from shell history and processes at the shell. It has a beautiful ncurses interface, sensible keybindings and is blazing fast. It truly supercharges your shell usage and you will not be able to live without it after.
$ 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
↓ keys (or the Vim
Ctrl+K keys) to navigate the list. You can even use the mouse to pick items from the list by clicking and Ctrl-clicking. 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.
UI decorations: A border can be added to the results list using the option
--border. The search term can be inline in the results list using the option
--info=inline. These and other commandline options to fzf can be set to the
FZF_CTRL_T_OPTS shell variable. For the Fish shell for example, I set this in
Tried with: FZF 0.17.1 and Ubuntu 16.04