mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-17 23:57:52 +08:00
1.2 KiB
1.2 KiB
PDF Plugin for Oh My Zsh
This plugin provides a convenient way to manage and open PDF files from your terminal using fuzzy finding.
Features
- Automatically detects available PDF readers (okular, evince, xpdf, firefox, and some others)
- Creates and maintains a list of PDF files in your home directory
- Uses
fzffor fuzzy finding and selecting PDF files - Fallback to
findcommand iffdis not available
Requirements
- Zsh with Oh My Zsh framework
- Any suitable PDF reader (e.g., okular, evince, xpdf, firefox, zathura, mupdf, qpdfview, atril)
fzffor fuzzy finding (recommended)fdcommand (optional, improves file search performance)
-
Activate the plugin in
~/.zshrc:plugins=(... pdf) -
Restart your shell or run:
source ~/.zshrc
Usage
Example usage:
# Open fzf to select a PDF
pdf
# Open a specific PDF file
pdf ~/Documents/example.pdf
Configuration
The plugin will automatically create a directory ~/.config/pdfiledoc/ and a file pdfs.txt to store the list of PDF files. This list is updated when:
- The
pdfs.txtfile doesn't exist - No PDF is selected from the existing list