fzf — Fuzzy Finder Documentation
fzf is a general-purpose command-line fuzzy finder. It reads a list of items from standard input, lets you interactively filter them with a fuzzy search, and outputs the selection to standard output. It integrates with your shell, editor, and any command that produces line-based output.
Who This Track Is For
- Server operators who navigate large directory trees and process lists of files
- Developers who want faster shell history, file, and git branch navigation
- DevOps engineers building interactive shell scripts and tooling pipelines
- Anyone replacing
grep | headworkflows with interactive fuzzy filtering
What You Will Build
- A fully configured
fzfshell integration (CTRL-T, CTRL-R, ALT-C) - Custom preview windows with
bat,tree, anddelta - Reusable shell functions for git, Docker, SSH, and process management
- A personal FZF toolkit deployable across any server via dotfiles
How To Use This Track
- Modules 1–2 are fundamentals — understand these before anything else
- Modules 3–4 cover shell integration and search syntax
- Modules 5–6 are customization (options, preview, colors)
- Modules 7–9 cover advanced usage, scripting, and integrations
- Modules 10–11 are real-world workflows and the cheatsheet
Learning Path
| Module | Focus | Lessons |
|---|---|---|
| 1. Introduction | What fzf is, philosophy, installation | 3 |
| 2. Core Usage | Basic syntax, keybindings, output handling | 3 |
| 3. Search Syntax | Fuzzy, exact, regex, operators, negation | 2 |
| 4. Shell Integration | CTRL-T, CTRL-R, ALT-C, fish, completions | 3 |
| 5. Customization | FZF_DEFAULT_OPTS, layout, colors, bindings | 3 |
| 6. Preview Window | bat, tree, delta, dynamic preview | 2 |
| 7. Advanced Usage | Multi-select, reload, transforms, headers | 3 |
| 8. Scripting | Shell functions, pipelines, reusable fzf tools | 2 |
| 9. Integrations | Git, Neovim, Docker, SSH, tmux, kubectl | 3 |
| 10. Real-World Workflows | DevOps, sysadmin, development patterns | 2 |
| 11. Cheatsheet | Keys, syntax, options, and variables | 1 |
How fzf Works
flowchart LR
INPUT["Input\n(stdin / find / ls / etc.)"] --> FZF["fzf\n(interactive filter)"]
FZF --> DISPLAY["Interactive TUI\n(fuzzy search + preview)"]
DISPLAY --> FZF
FZF --> OUTPUT["Output\n(selected lines → stdout)"]
OUTPUT --> CONSUMER["Consumer\n(open / delete / pipe to next cmd)"]
fzf vs Other Tools
| Tool | Interactive | Fuzzy | Scriptable | Preview | Shell integration |
|---|---|---|---|---|---|
fzf | ✅ | ✅ | ✅ | ✅ | ✅ |
grep | ❌ | ❌ | ✅ | ❌ | ❌ |
find | ❌ | ❌ | ✅ | ❌ | ❌ |
dmenu | ✅ | ✅ | Limited | ❌ | ❌ |
rofi | ✅ | ✅ | Limited | ✅ | ❌ |
peco | ✅ | ✅ | ✅ | ❌ | ❌ |
Quick Start
# Install (Debian/Ubuntu)
sudo apt install -y fzf
# Or latest via git
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install
# Basic usage: pipe any list into fzf
ls | fzf
find . -type f | fzf
cat /etc/passwd | fzf
# Open a file with fzf selection
nvim $(fzf)
cat $(fzf)
warning
fzf reads from stdin and writes to stdout. Between those two ends, it gives you an interactive TUI. Everything else — what feeds it and what consumes its output — is up to your shell.
Next Step
Start with What is fzf.