Quiz: fzf¶
3 questions
L0 (1 questions)¶
1. How do you use fzf to interactively select and kill a process?
Show answer
ps aux | fzf | awk '{print $2}' | xargs kill. Or with preview: ps aux | fzf --preview 'echo {}' | awk '{print $2}' | xargs killL1 (2 questions)¶
1. How do you use fzf with a preview window for file selection?
Show answer
fzf --preview 'cat {}' shows file contents while browsing. Customize: --preview-window=right:60% for layout. Combine with fd: fd -t f | fzf --preview 'head -50 {}'. For git: git log --oneline | fzf --preview 'git show {1}'. The {} placeholder is replaced with the selected line.2. What are the default fzf keybindings in a shell and how do you customize them?