zoxide
Quickly navigate to frequently used directories
TLDR
Go to the highest-ranked directory that contains "foo" in the name
Go to the highest-ranked directory that contains "foo" and then "bar"
Start an interactive directory search (requires fzf)
Add a directory or increment its rank
Remove a directory from zoxide's database
Generate shell configuration for command aliases (z, za, zi, zq, zr)
SYNOPSIS
z [options] [query]
PARAMETERS
query
The fuzzy search query for the directory. If omitted, jumps to the most recently used directory.
-h, --help
Display help message.
-V, --version
Show version information.
-a, --add
Add the specified path to the database.
-i, --init
Print initialization code for your shell.
-l, --list
List all stored directories and their ranks.
-s, --score
Show the score for the specified path.
-r, --remove
Remove the specified path from the database.
-x, --exclude
Exclude a path from being added to the database. Useful for temporary directories
DESCRIPTION
zoxide is a smarter `cd` command that remembers your frequently used directories. It allows you to quickly navigate to these directories using fuzzy matching.
Instead of manually typing long paths, you can simply type `z
zoxide integrates seamlessly into your shell and provides a significantly faster and more efficient way to navigate your file system, especially when dealing with deeply nested or frequently visited directories.
CAVEATS
zoxide needs to be initialized in your shell's configuration file (e.g., `.bashrc`, `.zshrc`) to function correctly. You must follow the instructions provided by `zoxide --init` for your specific shell. The tool builds its internal database on your directory traversals. If you are concerned about specific directories being included, you can exclude them.
DATABASE MANAGEMENT
zoxide stores its data in a database file. You can usually find the location by running `zoxide --init`, but it is usually located in `$HOME/.zoxide`. You can manually edit this file (though it's not recommended) or use `zoxide -r` to remove entries.
SHELL INTEGRATION
zoxide provides shell integration scripts for various shells (bash, zsh, fish, etc.). You must add the output of `zoxide --init` to your shell config file to enable zoxide.
HISTORY
zoxide is a relatively modern command-line tool designed to address the limitations of the traditional `cd` command.
It was created to provide a more efficient and intuitive way to navigate the file system, especially for users who frequently work with deeply nested or frequently accessed directories. The tool gained popularity due to its fuzzy matching capabilities and its ability to learn from user behavior.
It has become a favorite alternative to `cd` for many developers and system administrators due to its speed and ease of use.