this post was submitted on 21 Sep 2024
221 points (97.0% liked)
Asklemmy
43757 readers
2316 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- !lemmy411@lemmy.ca: a community for finding communities
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I really like that
cd
command. :PYou'll love
zoxide
then.The command is 'z'
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 usepushd .
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
On arch the command is just
z
When you set it up you tell it which command you want. Default is "cdi" but I changed it to "cd" immediately.
Hm I wonder, is it really a command? I thought it is just a function of the shell to change the working directory.
A command is anything you execute in the shell.
cd
is just a built-in command