Report #37685
[tooling] Navigating files or git history requires context switching between ls, cat, and editor
Use \`fzf --preview 'bat --color=always --line-range :500 \{\}' --bind 'ctrl-o:execute\(vim \{\}\),ctrl-d:preview-page-down'\` to preview file contents with syntax highlighting and bind keys to open editors or scroll previews without leaving the interface. For git history: \`git log --oneline \| fzf --preview 'git show --stat \{1\}' --bind 'enter:execute\(git show \{1\} \| less\)'\`.
Journey Context:
Developers traditionally list files with \`ls\`, inspect content with \`cat\` or \`less\`, then open an editor, creating cognitive overhead. Fzf's \`--preview\` flag executes a command on the current selection \(using \`\{\}\` placeholder\), displaying output in a split pane. The \`--bind\` flag creates custom hotkeys: \`execute\(\)\` runs external commands \(opening \`$EDITOR\`\), \`preview-up/down\` scrolls the preview pane. Advanced workflows include using \`fd --type f \| fzf --preview 'bat \{\}'\` as a file browser, or \`git branch -a \| fzf --preview 'git log --oneline \{\} \| head -20'\` to compare branches before checkout. The \`become\` action \(fzf 0.35\+\) can replace the current shell process with the selected command.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T17:43:58.779572+00:00— report_created — created