LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fzf

general-purpose command-line fuzzy finder

TLDR

Interactive file finder
$ find . -type f | fzf
copy
Select with preview
$ fzf --preview 'cat {}'
copy
Multiple selection
$ fzf -m
copy
Filter command history
$ history | fzf
copy
Fuzzy find and edit
$ vim $(fzf)
copy
Exact match mode
$ fzf -e
copy
Non-interactive filter (fuzzy grep)
$ fzf -f "[query]"
copy
Auto-select single match
$ fzf --select-1 -q "[query]"
copy

SYNOPSIS

fzf [options]

DESCRIPTION

fzf is a general-purpose fuzzy finder that filters any list interactively. It accepts input via stdin and outputs selected items, enabling powerful shell workflows.The tool provides instant feedback while typing, fuzzy matching for typo tolerance, and preview windows for context. Shell integration adds keybindings for history, files, and directories.fzf transforms command-line workflows with interactive selection for files, processes, git branches, and more.

PARAMETERS

-m, --multi

Enable multiple selection.
--preview CMD
Preview command.
-q QUERY, --query QUERY
Initial search query.
--height HEIGHT
Display height (rows or percentage).
--reverse
Layout from top.
--border
Draw border.
-e, --exact
Enable exact-match mode instead of fuzzy.
-f QUERY, --filter QUERY
Non-interactive filter mode (fuzzy grep).
-1, --select-1
Auto-select if only one match.
-0, --exit-0
Exit immediately if no match.
--ansi
Enable ANSI color code processing.
-d DELIM, --delimiter DELIM
Field delimiter regex for --nth.
-n N, --nth N
Limit search scope to specified fields.
--layout LAYOUT
Display layout: default, reverse, reverse-list.
--info STYLE
Info display style: default, right, hidden, inline.
--header STR
Display a sticky header string.
--bind KEYS
Custom key bindings.
--tac
Reverse input order.
--no-sort
Preserve original input order.
--cycle
Enable cyclic scrolling.
--print-query
Print the query as the first output line.
--help
Display help information.

SHELL INTEGRATION

CTRL-T: Paste selected file paths onto command lineCTRL-R: Search command historyALT-C: cd into selected directory

ENVIRONMENT VARIABLES

FZF_DEFAULT_COMMAND

Command to run when input is a terminal (replaces default find).
FZF_DEFAULT_OPTS
Default options applied to every fzf invocation.

CAVEATS

Requires terminal with full capabilities. Shell integration requires sourcing the fzf setup script. Large inputs may be slow.

HISTORY

fzf was created by Junegunn Choi in 2013. Written in Go for performance, it became essential tooling for command-line productivity, spawning integrations across shells, editors, and tools.

SEE ALSO

sk(1), peco(1), fd(1)

Copied to clipboard
Kai