Troubleshooting
Symptom first, cause second, in the order the lab and the documentation suggest you check them.
The match that should exist, doesn't
You can see the file in the tree. fzf insists otherwise.
- The feeder never printed it.
Run the feeder alone and read the
list. The usual shapes: the feeder
skipped it (a searcher's case —
chapter 7's trap, transcript t90 —
a
findpattern, a folder you are not standing where you think). More searches are lost here than in all other entries combined. - Smart case. A capital letter in
your query made it case-sensitive
(chapter 2). The lab's
Annualmatched nothing in a tree full ofannualand exited 1 (transcript t02). Retype in lower case, or set--ignore-caseif capitals are the habit. - The anchor sees the whole line.
^annualmatches no path, because lines start with their folder (transcript t02). Anchor what the line actually starts with — or scope the match to the name with--nth(chapter 5). - The query's second word fits nothing. And is strict: every piece must fit the same line. Drop words until it matches, then add back the one that helps.
The window opens empty
The feeder works alone; fzf shows nothing.
- The pipe is not the feeder you
think. A filter earlier in the
pipeline (a
grepthat matched nothing) starved the list. Test the pipeline in stages. - You wanted the default list.
With input piped — even from an
empty pipe — there is no default:
piped input is the list. For
fzf's own listing, run it bare at a
terminal, or set
FZF_DEFAULT_COMMAND(chapter 11). - A query was left standing.
--query=in yourFZF_DEFAULT_OPTS, or a widget's*_OPTS, pre-typed a filter that fits nothing. The window is honest; the standing query is the surprise.
The script hangs
A pipeline that worked by hand waits forever in a script.
- The window is open in the dark.
Without
--filter, fzf at any hint of a terminal opens its window — on a terminal device the script may still own. Scripts use--filter(chapter 8), always. - fzf is reading the script's own
input. With no pipe of its own,
in a script, fzf's list is the
script's standard input — and it
will consume the very lines a later
readwas waiting for. Give fzf its list explicitly, or< /dev/nullwhere it should find none.
The wrong line got acted on
The script chose a file — a real one, not the meant one.
- Score order. The first output
line is the best match, not the
first in the list (chapter 4's
2024putbudgetaboveannual). If the script needs input order, say--no-sort. If it needs the best match, tighten the query until the best is the only plausible. - The printed query came along.
With
--print-query, output line one is the question (chapter 8). A script that treats all output as choices will one day act on the query text as a file name. set -emet a healthy 1. No match exits 1 (transcript t06) — a result, handled on purpose in chapter 8's script, a silent death in a script that forgot.
The name arrived in pieces
An action split one chosen name into two, or dropped its spaces.
Unquoted expansion, somewhere after
fzf. The choice was one line; $choice
unquoted made it several arguments.
Quote it (chapter 8); for names with
stranger characters, move the whole
pipeline to chapter 10's NUL form
(--print0, read -d '', xargs -0).
The window feels slow
- The preview is the price. It
runs at every highlight movement
(chapter 9). Make the command
cheaper, bound its work (
head), or start hidden and toggle. - The list is enormous and the feeder rebuilds it per search. Narrow in the feeder first (chapter 15); fzf cannot rank faster than its list arrives.
Ctrl-R (or Ctrl-T, Alt-C) does nothing
- The integration is not loaded in
this shell. It loads from the
startup file; a shell opened before
you added the line (chapter 12)
does not have it. Open a new shell,
or evaluate the line by hand, and
test with transcript t09's
type -tcheck. - The version's plumbing differs.
Packaged fzf older than 0.48 has no
--bashto evaluate; it wants itskey-bindingsfile sourced instead (chapter 12). - Another program owns the key. Terminals reserve some chords (a menu on Alt-C is the classic); the widget is installed and the key never reaches the shell. The terminal's settings, or Esc-then-C, are the fixes.
- Ctrl-R opens, but the past is
tiny. The widget searches the
history the shell keeps. Small
history settings are a shell matter
(
HISTSIZEand friends), not an fzf one (chapter 6).