Published 2 minutes ago
João has been covering the tech world for over 7 years, with a heavy focus on laptops and the Windows ecosystem. I also love all things tech and videogames, especially Nintendo, which he’s always happy to talk about.
Prior to joining XDA in 2021, he worked at Neowin: https://www.neowin.net/news/poster/jo%C3%A3o-carrasqueira/
There are plenty of things that can be done exclusively within a terminal window, including various filesystem operations. A lot of people prefer being in the terminal, though when it comes to file management, I’m not usually a fan, partly because navigating folders can be extremely tedious when you have to write out full paths to a given directory.
B…
Published 2 minutes ago
João has been covering the tech world for over 7 years, with a heavy focus on laptops and the Windows ecosystem. I also love all things tech and videogames, especially Nintendo, which he’s always happy to talk about.
Prior to joining XDA in 2021, he worked at Neowin: https://www.neowin.net/news/poster/jo%C3%A3o-carrasqueira/
There are plenty of things that can be done exclusively within a terminal window, including various filesystem operations. A lot of people prefer being in the terminal, though when it comes to file management, I’m not usually a fan, partly because navigating folders can be extremely tedious when you have to write out full paths to a given directory.
But recently, I discovered a solution for this that’s very simple, but extremely smart and customizable. Zoxide is a better way to manage your filesystems; it works with most shells across Windows, macOS, and Linux, and it’s completely free. What’s not to love?
Related
Zoxide replaces the cd command
Why would you ever use it again?
On Windows, Zoxide can be installed from winget, though you can get it for other platforms in a wide range of ways. On macOS, you can use tools like Homebrew or Crates.io (among others), and various Linux package managers also host zoxide, including Arch’s Extra repository, APT, DNF, and more. You then need to enable Zoxide for your shell, a process that’s also explained on the project’s GitHub.
Once it’s installed and your shell has properly updated, you can use the z command as you would the cd command. The basic use is much the same, so you can just type in something like this to go to the Downloads folder on a Windows PC:
z C:\Users\joaoc\Downloads
What’s different, though, is that Zoxide will remember the directories you visit, and it will rank them in its database. When you open a folder for the first time, it automatically gets added to the database, and if there are no other folders with the same, you can now open that folder without typing the whole path. For the example above, I could just type in:
z Downloads
This would take me directly to the right folder, even if the Downloads folder isn’t directly in the folder I’m currently in. It’s a huge time saver. If you have multiple folders with the same name, then Z will take you to the highest-ranked folder in your database by default. Z can also match more than one word, so if you type something like z Down ads, you’ll still get taken to the Downloads folder. It will automatically match the highest-ranked directory that matches all your search terms.
If you want to choose between two folders with the same name in your database, you can use the zi command instead, which brings up all the matches for a given folder name so you can select them. Otherwise, you may need to do a little more setup.
Related
Fzf is an important add-on
Browse even more easily
The official guide for Zoxide mentions a tool called fzf, but it’s labeled as optional. But if you want to make the most of it, I highly recommend it, because there’s a bit more you can do if you have this tool installed.
This is because fzf enables a couple of things, most notably, the ability to update your database manually. With fzf installed, you can use the zoxide edit command to open your database and see all the folders that have been saved and their current rank. You can prioritize or deprioritize folders using keyboard shortcuts, as well as delete certain folders from the database if you prefer.
Depending on your shell, fzf also makes it even easier to choose between folders with the same or similar names. Instead of using the zi command, you can enter the regular z command with the folder name, then press Space and then Tab to see an interactive list of the folders that match your search. However, this only works with bash (version 4.4 or newer), fish, and zsh.
Related
I run these 4 commands first on every fresh Linux install
This is a good place to start if you’re new to the platform.
It works with Raycast too (and vicinae)
And a few other services as well
There isn’t much more that can be said about Zoxide itself, but one thing that makes it even cooler is that it supports integrations with other tools, too. For example, it works with a terminal-based file manager like Felix, or with the zsh-autocomplete plugin that adds autocomplete capabilities to zsh.
Most notably for me, however, is the integration with Raycast. You may already know I love Raycast, and by integrating with Zoxide, it jsut becomes that much easier to jump into a folder I use frequently. The Zoxide plugin for Raycast does require fzf to properly index your database, but with everything set up, it just works.
With this integration, you don’t even have to be in the terminal to quickly jump into a folder. Just launch Raycast with your preferred hotkey — you can even set a hotkey or alias to jump straight into Zoxide search — and type the name of the folder you want. You’ll be taken there instantly in your file manager of choice. It’s just another way to save time, even outside the terminal.
The Zoxide extension for Raycast is not available for the Windows release yet, but over on Linux, Vicinae supports the macOS version of the plugin, and it actually works. Again, you’ll need both Zoxide and Fzf, but once both are set up, the folders in your database appear directly in Vicinae for you to jump to them.
Related
Zoxide is amazing
It’s often said that big things come in small packages, and Zoxide is a prime example of that. It’s a tiny tool that only has one very spefici purpose, and it doesn’t seem all that big at first glance. But once you get used to how quickly you can jump from one folder to another, both in the terminal and using a file manager through Raycast, the benefits become obvious very quickly. If you haven’t yet, you can check out Zoxide’s GitHub below to learn more.