Navigating around in your shell
Navigating around in your shell
lf
Good article. Rather than aliasing `cd …/…" etc. I’ve got this function in my setup:
up () { local x='' for i in $(seq ${1:-1}) do x="$x../" done cd $x }This lets me do up 4 to go up 4 directories.
Look into zoxide.
z direc
Will take you to the most used directory starting with “direc” eg “/home/me/random/directory”
The dir’s are the same names or similar? A few extra key strokes to get the fullname should be easier than cd’ing back and forth.
There’s also z foo as per docs to get interactive list for matches.
But, just a suggestion!
What I use to automatically extend stuff like ls … to ls …/…/…/…
(for zsh)
How would you define “knowing” and “using” linux? Many people here don’t use Linux professionally and only on the desktop, so they probably aren’t too familiar with all the features of different cli programs.
Reading a blog post is more accessible than reading a man page. I didn’t know cd -, so reading the post was worth it I’d say.
Reading a blog post is more accessible than reading a man page.
I don’t agree with that assessment at all. People should learn to read manpages, instead of being spoon-fed pieces of manpages in inferior form.
r function regularly to go to the git project root. But I call it gtop. I mostly use that and zoxide to get around.