fd and fzf Installation
This guide provides platform-specific installation instructions for fd
and fzf
, which are required dependencies for ZSH Support file tagging functionality.
Both fd
(fast file finder) and fzf
(fuzzy finder) are required for the @filename<Tab>
file tagging feature in ZSH Support. Without these tools, pressing Tab after @
will not trigger the fuzzy finder, and you'll need to type full file paths manually.
Install fd (Fast File Finder)
fd
is a fast and user-friendly alternative to the traditional find
command, used by ZSH Support to quickly locate files in your project.
macOS
brew install fd
Ubuntu/Debian
sudo apt install fd-find
On Ubuntu/Debian systems, the binary is installed as fdfind
instead of fd
due to a naming conflict. The ZSH integration handles this automatically.
Arch Linux
sudo pacman -S fd
Other Linux Distributions
Using cargo (if Rust is installed):
cargo install fd-find
Manual installation from GitHub releases:
- Visit fd releases page
- Download the appropriate binary for your system
- Extract and place in your PATH
Verify fd Installation
fd --version
Install fzf (Fuzzy Finder)
fzf
is a command-line fuzzy finder that provides the interactive file selection interface in ZSH Support.
macOS
brew install fzf
Ubuntu/Debian
sudo apt install fzf
Arch Linux
sudo pacman -S fzf
Other Linux Distributions
Manual installation using git:
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
Using package managers:
- CentOS/RHEL/Fedora:
sudo dnf install fzf
orsudo yum install fzf
- openSUSE:
sudo zypper install fzf
Verify fzf Installation
fzf --version
Troubleshooting
Command Not Found After Installation
If fd
or fzf
commands are not found after installation:
-
Check if they're in your PATH:
which fd fzf
-
Restart your terminal or reload your shell configuration:
source ~/.zshrc
-
For Ubuntu/Debian fd issues: The binary might be installed as
fdfind
. Create a symlink:ln -s $(which fdfind) ~/.local/bin/fd
Permission Issues
If you encounter permission errors during installation:
- Avoid using
sudo
withcargo install
- this can create permission issues - Use a package manager instead when available
- For manual installations, ensure the binary is placed in a directory you own (like
~/.local/bin
)
ZSH Support Still Not Working
After installing both tools, if file tagging still doesn't work in ZSH Support:
-
Verify both tools are installed:
fd --version && fzf --version
-
Reload ZSH configuration:
source ~/.zshrc
-
Test the integration:
: test file tagging @package.json<Tab>
-
Check the ZSH Support troubleshooting section for additional help.
Platform-Specific Notes
macOS
- Homebrew installation is the most reliable method
- Both tools integrate seamlessly with the system PATH
Linux
- Most modern distributions include both tools in their repositories
- Ubuntu/Debian users should be aware of the
fdfind
vsfd
naming
Windows (WSL)
- Use the Linux installation methods within WSL
- Ensure your WSL distribution is up to date before installing
Alternative Installation Methods
If the standard installation methods don't work for your system:
Using Nix
nix-env -i fd fzf
Using Snap (Ubuntu)
sudo snap install fd fzf
Building from Source
Both tools are written in Rust and can be built from source:
fd:
git clone https://github.com/sharkdp/fd.git
cd fd
cargo build --release
fzf:
git clone https://github.com/junegunn/fzf.git
cd fzf
make install