Dependencies
Required Dependencies
Section titled “Required Dependencies”These tools must be installed for my-fzf to load. If any are missing, my-fzf aborts with an error message.
| Tool | Purpose | Install |
|---|---|---|
| fzf | Fuzzy finder — the core selection UI | pacman -S fzf / brew install fzf / apt install fzf |
| fd | Fast file and directory search — replaces find | pacman -S fd / brew install fd / apt install fd-find |
| rg (ripgrep) | Fast content search — replaces grep | pacman -S ripgrep / brew install ripgrep / apt install ripgrep |
| bat | File preview with syntax highlighting | pacman -S bat / brew install bat / apt install bat |
| zoxide | Smart cd that learns your habits | pacman -S zoxide / brew install zoxide / apt install zoxide |
Optional Dependencies
Section titled “Optional Dependencies”These tools enhance my-fzf but are not required. Missing optional dependencies are warned about at load time, and related commands are skipped.
| Tool | Purpose | Affected Commands |
|---|---|---|
| nvim (Neovim) | Open files in editor | n and gn commands (fcn, frn, fgn, fcgn, frgn, fggn, etc.) |
How Dependency Checking Works
Section titled “How Dependency Checking Works”When you source my-fzf.sh, it checks for each required dependency using command -v. If any required tool is missing, my-fzf prints an error and aborts — no commands are defined.
For optional dependencies, my-fzf prints a warning but continues loading. Commands that depend on the missing tool are simply not generated.
# What you'll see if fd is missing:my-fzf: required dependency 'fd' not found — aborting
# What you'll see if nvim is missing:my-fzf: optional dependency 'nvim' not found — related commands skipped