fzf (Fuzzy Finder) is a general-purpose command-line fuzzy finder. Simply put, it’s a filter that lets you find what you need in the terminal at lightning speed. Whether you’re looking for files, command history, processes, or Git branches, you just pipe in a list and it lets you instantly locate items with fuzzy input (no exact spelling needed). It follows the Unix philosophy (do one thing and do it well) and integrates seamlessly with Vim, Bash, Zsh, Fish, and more.
Especially when dealing with complex legacy codebases or server logs, fzf greatly reduces the cognitive load and number of keystrokes.

Key Features
The core function of fzf is ‘interactive filtering’, with a wide range of practical applications:
- File Search: Replaces traditional
findcommands, letting you quickly find files deep in the directory tree using keywords. - Command History Search: Replaces
Ctrl+R, allowing you to fuzzy search a long command you typed weeks ago in a visual list. - Process Management: Combine with
psto quickly filter process IDs and kill them. - Git Integration: Quickly switch branches, view commit history.
- Editor Plugins: Quickly open files and jump between buffers in Vim/Neovim.
- Auto-completion: Provides intelligent file path completion for commands.
Getting Started (Basic Examples)
- Installation (Common Methods)
- macOS (Homebrew):
brew install fzf; Linux (package manager):apt install fzf/pacman -S fzf; Alternatively, download the binary from GitHub releases or run the install script~/.fzf/installafter cloninggit cloneto enable shell integration.
- macOS (Homebrew):
- Basic Usage
- Simply run
fzf, it reads a list fromstdinand you interactively select:ls | fzf. - Search git history and output SHA:
git log --oneline | fzf.
- Simply run
- Common Shortcuts (after shell integration)
CTRL-T: Replace the current cursor position in the command line with the selected file path;CTRL-R: Search command history;ALT-C: Interactively change directory.
- Preview Example
- File selection with preview pane:
fzf --preview 'head -100 {}'({}is the placeholder for the selected item). For more advanced previews, combine with tools likebat,less, etc.
- File selection with preview pane:
- Advanced Usage
- Bind custom actions, use
--bindin scripts, customize the interface with--height,--layout=reverse, etc., or use--filterto reuse fuzzy matching capabilities in non-interactive scenarios.
- Bind custom actions, use












