fzf flags & options
Basic usage
Interactively filter and select from stdin.
find . -type f | fzf
-m, --multi
Enable multi-select with Tab.
git log --oneline | fzf -m
-e, --exact
Exact match instead of fuzzy.
cat /etc/services | fzf -e
--preview
Show a preview of the selected item.
fzf --preview 'cat {}'
fzf --preview 'head -50 {}'
--filter
Non-interactive mode — filter and print matches.
echo -e "foo\nbar\nbaz" | fzf --filter="ba"
--height
Limit the finder height instead of using full screen.
ls | fzf --height 40%
--reverse
Show the finder from top to bottom.
ls | fzf --reverse
--with-nth
Display only specific fields of each line.
ps aux | fzf --with-nth=1,11..
-d, --delimiter
Set the field delimiter for --with-nth and --nth.
cat /etc/passwd | fzf -d: --with-nth=1
-q, --query
Start with a pre-filled query.
fzf -q ".py"
--bind
Set custom key bindings.
fzf --bind 'ctrl-y:execute-silent(echo {} | xclip -selection clipboard)'
Common patterns
Open a file in your editor.
vim $(fzf)
Checkout a git branch.
git checkout $(git branch | fzf)