export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always {}'"

Category: Terminal Configuration

export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always {}'"

Show syntax-highlighted file previews in fzf

When you press Ctrl+T, fzf shows a preview panel with syntax-highlighted file contents using bat (install with `sudo apt install bat`). This turns fzf into a visual file browser. Press Enter to insert the selected file path.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.