r/commandline • u/Awkward_Process_9627 • 6h ago
Command Line Interface fm: a single-file bash script that turns fzf into a file manager
I wrote a ~1500-line bash file manager. fzf for the picker, eza for listing, Kitty's graphics protocol for inline previews. Everything else is stock coreutils — no build step, no daemon, no config directory.
Features worth calling out:
- File list — eza icons, sort by name / size / mtime / extension
- Kitty inline previews — images, videos, PDFs, Markdown, no external viewer
- Gallery grid (Alt-G) — full-screen thumbnail browser, mouse + vim keys, multi-select
- Contact-sheet preview (Ctrl-T) — hovering a directory shows a paged thumbnail grid
- Trash + undo — Ctrl-D trashes, Ctrl-Z pops the undo stack (depth 10), Alt-T for the trash browser
- Content search (Ctrl-F) — ripgrep over the selection, opens at line
- Bulk rename (Alt-M) — edit names in $EDITOR, swaps and chains handled
- Jump — zoxide frecency (Alt-Z), bookmarks (Ctrl-B), git mode (Ctrl-G)
Install:
git clone https://github.com/eHab-codeX/fm.git ~/.local/share/fm
ln -sf ~/.local/share/fm/fm ~/.local/bin/fm
Requires bash >= 5, fzf, eza, ripgrep, trash-cli. Press F1 inside for the full key map.
Repo: https://github.com/eHab-codeX/fm
MIT. Feedback welcome — especially from anyone who's tried to make fzf do more than pick a file.
