5 ms·
I was wondering if any of you use alternatives or hacks for the cd command? I've been testing out a couple of different ones, like xd, fcd, wcd and pushd/popd,
by bronlund 8y ago
I was wondering if any of you use alternatives or hacks for the cd command?
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 :)
- temo4ka 8y agoI use z [1], it builds up a list of folders you visit based on frequency and lets you quickly jump into them by fuzzy-searching it. Z also has tab completion allowing you to cycle through the matches. See project's home for examples of its work at the link below. [1]: https://github.com/rupa/z https://github.com/rupa/z
- steeef 8y agoHere's another that I use daily: https://github.com/clvv/fasd https://github.com/clvv/fasd You can even combine that with the aforementioned `fzf`: https://github.com/junegunn/fzf/wiki/examples#with-fasd-1 https://github.com/junegunn/fzf/wiki/examples#with-fasd-1
- euank 8y agoI can recommend pazi as a convenient tool for zapping around https://github.com/euank/pazi https://github.com/euank/pazi The readme also lists several alternatives in the same space as pazi.
- IronBacon 8y agoNothing fancy. I simply use the Zsh dirstack (with auto_pushd) so 'cd -' instead to be limited to the previous path only like in Bash, can be expanded with Tab to one of the last DIRSTACKSIZE path. 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...
- gpmcadam 8y agoFew from my aliases file that may help: 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.)
- bronlund 8y agoThanks guys. This is great stuff :)