I've been testing out a couple of different ones, like xd, fcd, wcd and pushd/popd, but I'm not quite sure which I should commit to or if there are better ways :)
I've been testing out a couple of different ones, like xd, fcd, wcd and pushd/popd, but I'm not quite sure which I should commit to or if there are better ways :)
7 │ alias ..="cd .."
8 │ alias ...="cd ../.."
9 │ alias gcd="cd (git rev-parse --show-toplevel)"
The first two should be self explanatory.The third one will take you to the "git root" of a directory structure, i.e. the top-level folder where the .git directory is (I find this grounds me for when I'm doing git commands.)
You can even combine that with the aforementioned `fzf`: https://github.com/junegunn/fzf/wiki/examples#with-fasd-1
The readme also lists several alternatives in the same space as pazi.
The dirstack can also be saved to a file and reused on the next session.
Then I've stolen the "up" function somewhere to cd to a specific level using a part of the path when I'm deep in a FS tree.
Finally, not limited to cd only, Zsh can also expand paths with only the initials of the dirs, so 'cd /v/c/a/aTab' is expanded to 'cd /var/cache/apt/archives/', usually with less typing required on Bash...