Navigating directories efficiently in the terminal is essential for
productivity. While cd has been the standard for decades, there are smarter
and faster alternatives.
Meet the y → z workflow—a powerful way to jump between directories and
manage files effortlessly.
What is y → z
The letters y and z don’t have an inherent meaning, but their alphabetical
order mirrors c and d—making them easy to remember as a cd alternative.
This workflow leverages:
-
zoxide– A smartercdreplacement that remembers frequently visited directories. -
yazi– A blazing-fast terminal file manager withzoxideintegration. -
fzf– A fuzzy finder that enhances interactive navigation.
The Power of z (zoxide)
zoxide enhances terminal navigation by remembering frequently visited
directories. The z command allows you to quickly jump to a known directory
based on name matching. For even more flexibility, zi integrates zoxide
with fzf, enabling an interactive fuzzy search through your directory
history, letting you select a destination effortlessly.
Basic Commands
z project # Jump to a frequently visited "project" directory
zi # Use fzf to interactively search recent directories
The Power of y (yazi)
yazi is a powerful
terminal-based file manager designed for fast and efficient navigation. One of
its standout features is its seamless integration with zoxide. While using
yazi, you can press z to instantly jump to any frequently visited directory
tracked by zoxide. This allows you to combine fuzzy directory switching with
visual file management, creating a smooth and efficient workflow for handling
files and navigating your system.
Basic Commands
y # Open yazi
Once inside yazi, press z to instantly jump to a directory tracked by
zoxide.
However, when a full TUI file explorer isn't necessary, you might prefer using
zi directly. Instead of opening yazi, the zi command allows you to
instantly select and jump to a directory using fuzzy search—making it the
fastest option for quick directory switching.
Conclusion
If you're looking for a faster way to move around your file system, the y →
z workflow is a game-changer.
Top comments (0)