What is Zoxide
Zoxide is a better ‘cd’ with additional features to help you shortcut some repetitive, tedious tasks.
For those that don’t know, ‘cd’ is a terminal command to navigate through your machine’s file system
How does cd work
The command ‘cd’ stands for change directory, which is pretty self-explanatory. Let’s say that you have the current file structure, and the current root folder name, in this case, is called `tutorial`. Now, if we want to navigate to the ‘folder1’ directory, we use the following command.
Then, our terminal will be pointed to `folder1` under `tutorial.` If we wish to go up a folder back to `tutorial,` we run the following command.
The `..` will reference the parent directory. There may be instances where you have to navigate to a folder that is 5 layers deep, and once you get there, you will notice that navigating back to the root folder is not as straightforward. You will have to make a mental note of how many folders deep you are and run something like this.
The command above will point your machine 4 folders up. You can start to see the problem. A similar annoyance arises when you initially want to navigate to your project from a new terminal window. Most of my projects are in a folder called ‘code,’ so every time I want to navigate to a project, I run something like the one below.
Where Zoxide comes in
Doing all these navigation jumps becomes a little repetitive after a while. Wouldn’t it be nice if I could just go straight to the project? Well, that’s what Zoxide is for. Zoxide uses ‘z’ instead of ‘cd’. So instead of typing `cd ./code/supercoolproject` every time, you only have to do it once with ‘z’!
Zoxide will remember where you went! It never gets old, and I use it every time. If the end folder has a similar name to another path you z’d to, it will prompt you to pick!
Will it make me 10x?
No. Some of you may be saying, “This doesn’t save that much time, “and I will say, yeah, you are right. For me, it is not about the time saved but the convenience it brings. I rather type less than I need to do the same thing.
Happy hacking!
I’m 100% using this. I was wondering if there was a way to make navigating between files easier but was too lazy to look it up.