zoxide not working - Troubleshooting Guide
If zoxide is installed but not working as expected, this guide will help you diagnose and fix the issue.
Common Issues
Issue 1: zoxide Commands Not Recognized
Symptoms:
zcommand not foundzicommand not found- "command not found" errors
Solutions:
- Verify shell configuration is loaded:
- Reload shell configuration:
- Check if zoxide binary exists:
Issue 2: zoxide Not Learning Directories
Symptoms:
- zoxide doesn't remember visited directories
zcommand always fails to find directories- No history is being built
Solutions:
- Check database location:
- Verify permissions:
- Check environment variables:
- Manually add a directory to test:
Issue 3: Slow Performance
Symptoms:
- zoxide commands are slow
- Delay when using
zcommand - High CPU usage
Solutions:
- Exclude large directories:
- Check database size:
- Clean up old entries:
- Reduce max age:
Issue 4: Wrong Directory Selected
Symptoms:
z projectgoes to wrong directory- Multiple matches but wrong one chosen
- Inconsistent behavior
Solutions:
- Use interactive mode:
- List all matches first:
- Be more specific:
- Check frequency:
- zoxide learns from usage
- Frequently visited directories get higher priority
- Use directories more often to improve matching
Issue 5: Shell Integration Not Working
Symptoms:
zcommand works but doesn't change directory- Shell hooks not executing
- No automatic directory tracking
Solutions:
- Verify initialization:
- Check shell compatibility:
- Make sure you're using a supported shell (bash, zsh, fish, PowerShell)
- Some shells may need different initialization
- Manual hook setup (if needed):
Diagnostic Steps
Run these commands to diagnose the issue:
Platform-Specific Issues
Linux
Issue: Permission denied
macOS
Issue: Homebrew path not found
Windows
Issue: PowerShell execution policy
Reset zoxide
If nothing works, you can reset zoxide:
Getting Help
If you're still experiencing issues:
- Check the official zoxide documentation
- Search GitHub issues
- Verify your zoxide version is up to date
- Check system compatibility
Prevention Tips
- Keep zoxide updated:
- Regular maintenance:
- Periodically check database size
- Exclude unnecessary directories
- Keep shell configuration clean
- Test after changes:
- Always test zoxide after modifying shell config
- Verify in new terminal window
- Check both
zandzicommands