
Zz: A smart and efficient directory changer (2017) - luu
http://leahneukirchen.org/blog/archive/2017/01/zz-a-smart-and-efficient-directory-changer.html
======
xiaq
Shameless plug: a shell I develop has builtin directory history:
[https://elv.sh/learn/cookbook.html](https://elv.sh/learn/cookbook.html)
(search for "directories")

~~~
jhallenworld
You can make this for bash. I have "nd" and "pd", step to next or previous
directory in the directory history (and "cd" adds an entry to the history). I
like this a bit better then z, but it would be better to have both.

Code is here if anyone interested, look for the funccd, funcnextdir,
funcprevdir and associated aliases.

[https://github.com/jhallen/joes-
sandbox/blob/master/setup/ba...](https://github.com/jhallen/joes-
sandbox/blob/master/setup/bashrc)

------
Epskampie
I use fzf’s [https://github.com/junegunn/fzf](https://github.com/junegunn/fzf)
ctrl+r for this. This is like ctrl-p in sublime text, but for recent commands.
The nice thing is this works for every kind of command, not just cd. If you
configure your shell with a long history, it really saves a lot of typing.

------
axegon_
I like it. Kinda reminds me of jump[1] which at a period I was using a lot but
forgot about it when I got a newer laptop and did the "oh crap, I miss that,
I'll install it tomorrow" for 3 weeks and eventually forgot about it.

[1]
[https://github.com/gsamokovarov/jump](https://github.com/gsamokovarov/jump)

------
sambroner
I used this for a bit, but ultimately found the non-determinism to be a
problem for me. I ended up specifically aliasing a few common directories,
going from there to sub-dirs was really easy.

------
selfishgene
Anything like this exist for Powershell?

