sandybridge.io
All TIL notes
TIL·

Pipe stderr through fzf

A one-liner for interactive stderr filtering in bash.

#bash#fzf#cli

Sometimes you need to filter stderr output interactively. Here's a quick one-liner:

command 2>&1 >/dev/null | fzf

This redirects stderr to stdout, then stdout to /dev/null, leaving only stderr for fzf to process.

For a more practical example, filtering through build errors:

cargo build 2>&1 >/dev/null | fzf --height 40%