FZF_DEFAULT_OPTS and Configuration
fzf has no config file. All persistent configuration is done through the FZF_DEFAULT_OPTS environment variable. Every fzf invocation inherits these options, which you can override per-invocation with explicit flags.
No Config File
This is intentional Unix design. FZF_DEFAULT_OPTS is scriptable, composable, and source-controllable in your dotfiles. You can inspect it with echo $FZF_DEFAULT_OPTS.
Setting FZF_DEFAULT_OPTS
~/.bashrc or ~/.zshrc
export FZF_DEFAULT_OPTS="
--height=60%
--layout=reverse
--border=rounded
--margin=1
--padding=1
--prompt=' '
--pointer='▶'
--marker='✓'
--info=inline
--no-separator
"
Multi-line value works: everything inside the quotes is treated as one string.
Layout Options
--height
--height=40% # use 40% of terminal height (floating window over shell)
--height=20 # use 20 lines (absolute)
--height=-10 # use all but 10 lines
--height=100% # full screen (default if not set)
--layout
--layout=default # results top, query bottom (classic)
--layout=reverse # query at top, results below (modern, most popular)
--layout=reverse-list # results reversed, query at bottom
--border
--border=none # no border
--border=rounded # rounded corners (─ ╭ ╮ ╰ ╯)
--border=sharp # sharp corners (─ ┌ ┐ └ ┘)
--border=bold # bold borders
--border=block # block characters
--border=thinblock # thin block
--border=double # double lines
--border=horizontal # top and bottom only
--border=vertical # left and right only
--border=top|bottom|left|right # single side
--margin and --padding
--margin=1 # 1 char margin on all sides outside border
--margin=2,4 # 2 vertical, 4 horizontal
--padding=1 # 1 char padding inside border
--min-height
--min-height=10 # don't shrink below 10 lines even with --height=20%
Prompt and Pointer
--prompt=" " # nerd font search icon
--prompt="> " # classic
--pointer="▶" # currently selected item indicator
--marker="✓" # multi-select mark character
Info Display
--info=default # shows match count below input
--info=right # shows count at right of input
--info=inline # shows count inline with input (cleaner)
--info=hidden # hide match count
--tmux — Floating Popup Window (fzf 0.53+)
Run fzf as a tmux popup instead of taking over the terminal:
fzf --tmux # center, 50% width and height
fzf --tmux center # center of screen
fzf --tmux top # top edge
fzf --tmux bottom # bottom edge
fzf --tmux left # left edge
fzf --tmux right # right edge
fzf --tmux center,80%,60% # center, 80% wide, 60% tall
# In FZF_DEFAULT_OPTS:
export FZF_DEFAULT_OPTS="--tmux center,80%,60%"
tip
--tmux is a major quality-of-life improvement when inside a tmux session. The fzf picker floats over your work instead of taking over the full pane.
--walker — Built-in File Walker (fzf 0.56+)
Replace find / fd with fzf's built-in parallel walker:
--walker=file,dir,follow,hidden
# file: include files
# dir: include directories
# follow: follow symlinks
# hidden: include hidden files/dirs
# In FZF_DEFAULT_OPTS:
export FZF_DEFAULT_OPTS="--walker=file,follow,hidden --walker-skip=.git,node_modules"
Complete Recommended Configuration
~/.bashrc or ~/.zshrc
# ─── fzf core defaults ────────────────────────────────────────────
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
export FZF_DEFAULT_OPTS="
--height=60%
--layout=reverse
--border=rounded
--margin=1,2
--padding=1
--prompt=' '
--pointer='▶'
--marker='✓ '
--info=right
--ansi
--bind='ctrl-/:toggle-preview'
--bind='ctrl-u:preview-half-page-up'
--bind='ctrl-d:preview-half-page-down'
--bind='ctrl-a:select-all'
--bind='alt-enter:print-query'
--bind='ctrl-y:execute-silent(echo -n {} | xclip -selection clipboard)+abort'
--color=fg:#cdd6f4,bg:#1e1e2e,hl:#89b4fa
--color=fg+:#cdd6f4,bg+:#313244,hl+:#89b4fa
--color=info:#94e2d5,prompt:#89b4fa,pointer:#f5c2e7
--color=marker:#a6e3a1,spinner:#f5c2e7,header:#a6e3a1
--color=border:#313244
"
# ─── Shell integration defaults ──────────────────────────────────
export FZF_CTRL_T_COMMAND='fd --type f --hidden --follow --exclude .git'
export FZF_CTRL_T_OPTS="
--preview 'bat --color=always --style=numbers --line-range=:300 {}'
--preview-window 'right:60%:hidden'
--bind 'ctrl-/:toggle-preview'
"
export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude .git'
export FZF_ALT_C_OPTS="
--preview 'tree -C {} | head -200'
--preview-window 'right:50%'
"
export FZF_CTRL_R_OPTS="
--scheme=history
--preview 'echo {}'
--preview-window 'up:3:hidden:wrap'
--bind 'ctrl-/:toggle-preview'
"