DEV Community

Masatoshi Nishiguchi
Masatoshi Nishiguchi

Posted on

Boost Your Terminal Navigation with the y z Workflow

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 yz workflow—a powerful way to jump between directories and
manage files effortlessly.


What is yz

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 smarter cd replacement that remembers frequently visited directories.
  • yazi – A blazing-fast terminal file manager with zoxide integration.
  • 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 
Enter fullscreen mode Exit fullscreen mode

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 
Enter fullscreen mode Exit fullscreen mode

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.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay