Navigating around in your shell

https://programming.dev/post/6321543

Navigating around in your shell - programming.dev

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.

Oh I really like this. I never had an alias for this since I need to do multiple backwards cds very rarely, but I might just copy this
Go for it. I’ve been using it for years without a problem.
I have the zsh option autopushd set which calls pushd in interactive shells for every cd, that way 90% of the time when I want to go back up to another path I can just use popd