Jump to your frequently used directories faster with Zoxide

What is Zoxide?

Zoxide is a command-line utility for easily navigating directories on Unix-like operating systems. It is written in Rust programming language and aims to provide a faster and more efficient alternative to the cd command.

One of the main features of Zoxide is its ability to store frequently used directories and quickly jump to them using a short alias. For example, instead of typing cd .config/lvim, you can simply type z lvim to jump to the lvim directory. Zoxide also supports fuzzy matching, so you can type z lvi and it will automatically find the closest match, in this case lvim.

move to  folder without writing the full path

you don't have to type the whole directory name

In addition to navigating directories, Zoxide also has interactive selection mode. You can type zi config and it will show a list of directories that contains config on its name.

For more usage, you can visit the Zoxide readme or manual page (man zoxide).

Zoxide is designed to be easy to use and customize. Flags and environment variables can be used for configuration, such as the number of recently used directories to remember, and the behavior of the tab completion (fzf). You can also define your aliases and functions to further tailor Zoxide to your needs.

How to install Zoxide?

  1. Install zoxide

    In Arch Linux, you can install it using this command

     sudo pacman -S zoxide

    You can also use yay

     yay -S zoxide

    For other distro or OS, you can read the zoxide readme

  2. Add zoxide to your shell

    To start using zoxide, add it to your shell.

    • Bash

      Add this to your configuration (usually ~/.bashrc):

        eval "$(zoxide init bash)"
    • Zsh

      Add this to your configuration (usually ~/.zshrc):

        eval "$(zoxide init zsh)"

      For completions to work, the above line must be added after compinit is called. You may have to rebuild your cache by running rm ~/.zcompdump*; compinit. For other shells, you can read the zoxide readme.

  3. Install fzf (optional)

    fzf is a command-line fuzzy finder, used by zoxide for interactive selection. It can be installed from here.

Zoxide is a fast and efficient tool that can greatly improve your productivity when working with the command line. Its ability to quickly jump between directories and list the contents of a directory makes it a valuable addition to any Unix-like operating system. Its tab completion and customization options add to its versatility and make it a must-have for anyone working with the command line regularly.