A beautiful interactive terminal manpage viewer with fuzzy finding capabilities. fzm enhances your manpage browsing experience with intuitive search, rich previews, and seamless integration with other documentation tools.
- Fuzzy Finding: Intuitive search through all available manpages using fzf
- Multiple Search Modes:
- Fuzzy search with partial matching
- Exact match with single quotes
- Multi-term AND search
- Prefix/suffix matching
- Exclusion with
!term
- Interactive Preview: Real-time manpage preview with syntax highlighting
- Toggleable Preview Window: Show/hide preview pane with
Ctrl-SpaceorCtrl-P
- TLDR Integration: Combine manpages with practical examples from tldr
- Syntax Highlighting: Beautiful code highlighting using bat (when available)
- Smart Wrapping: Proper text wrapping in preview panes
- Section Headers: Clear visual separation between examples and full documentation
- Beautiful Colors: Custom color scheme with optimal contrast
- Interactive Controls:
- Scroll preview with
Ctrl-D/Ctrl-U(half page) andCtrl-F/Ctrl-B(full page) - Resize preview pane with
Alt-Up/Alt-Down - Toggle text wrapping with
Alt-W - Change sort order with
Ctrl-R
- Scroll preview with
- Visual Borders: Clean, rounded borders and section separators
- Responsive Layout: Adapts to terminal size and preferences
- Fast Startup: Optimized for quick access to documentation
- Direct Access: Pass commands directly for instant manpage viewing
- Seamless Fallbacks: Graceful degradation when optional tools are missing
- Alias-Friendly: Easy to integrate as
manreplacement
# Browse all manpages interactively
fzm
# Open specific command directly
fzm ssh
# Browse with tldr examples
fzm -e- Ensure dependencies are installed:
# Required
sudo apt install fzf man-db # Ubuntu/Debian
brew install fzf # macOS
# Optional (for enhanced experience)
sudo apt install bat tldr # Ubuntu/Debian
brew install bat tldr # macOS- Download the script and make it executable:
curl -o fzm.sh https://raw.githubusercontent.com/stefan-hacks/fzm/main/fzm.sh
chmod +x fzm.sh
sudo mv fzm.sh /usr/local/bin/fzmAdd to your ~/.bashrc or ~/.zshrc:
# Replace standard man with fzm
alias man='fzm'
# Quick access to examples
alias mane='fzm -e'
# Keep original man command
alias oman='/usr/bin/man'| Key Binding | Action |
|---|---|
Enter |
Open selected manpage |
Ctrl-Space / Ctrl-P |
Toggle preview window |
Ctrl-D / Ctrl-U |
Scroll preview down/up (half page) |
Ctrl-F / Ctrl-B |
Scroll preview down/up (full page) |
Alt-Up / Alt-Down |
Resize preview pane |
Alt-W |
Toggle preview text wrapping |
Ctrl-R |
Toggle sort order |
Ctrl-A |
Select all items |
Esc |
Exit without opening |
- Fuzzy Search: Just type parts of the command name
- Exact Match: Use single quotes:
'command' - Multi-word: Space-separated terms (AND search)
- Prefix/Suffix:
^prefixorsuffix$ - Exclusion:
!termto exclude matches
- fzf: Fuzzy finder (installation)
- man: Manual page viewer (usually pre-installed)
- bat: Syntax highlighting (installation)
- tldr: Practical examples (installation)
### For Learning
```bash
# Discover new commands
fzm
# Learn with examples
fzm -e
The script respects standard environment variables:
MANWIDTH: Control manpage widthMANPAGER: Custom manpage viewer
Cycle through preview sizes: 35% → 50% → 65% → 80%
The script includes a custom color scheme that works with most terminal themes.
Contributions are welcome! Please feel free to submit pull requests for:
- Bug fixes
- New features
- Documentation improvements
- Performance optimizations
This project is open source. Feel free to use and modify as needed.
fzm - Making manpages beautiful and accessible since 2024. ✨