What's a handy terminal command you use often?

submitted by
262
201

Back to main discussion

Parent comment

by
[deleted]
edited depth: 3

Deleted by author

The command is ‘z’

by
[deleted]
edited depth: 5

Deleted by author

It’s in the official docs for zoxide, you are supposed to use the z alias, and many distros just set it up directly like that. I love doing z notes from wherever I am.

Description fifth point (5.)

That doesn’t require a separate package, especially one which uses eval on every new shell. And isn’t messing with my distros or personal aliases (and doesn’t introduce cargo-packaging).

Simply adding one to two (you get the gist) directories and a keybind for cd … is more slick. There are cases where you might use pushd . but even then other tooling should already cover your needs.

It’s also so easy that you can temporarly append to $CDPATH for a specific session. But again, then a second pane or pushd is already available.

Now downvote me, lemmy.



You have to enable it in your shell config. For bash it's eval "$(zoxide init bash)"

That will give you the z command.

https://github.com/ajeetdsouza/zoxide?tab=readme-ov-file#installation




When you set it up you tell it which command you want. Default is “cdi” but I changed it to “cd” immediately.


On arch the command is just z



Insert image