Zsh has this out of the box. You just type the name of a directory and it will `pushd` to it. At least I think it's built-in. It could be oh-my-zsh I suppose.
It's not out of the box. It works on my omz shell, although I didn't do anything to specifically enable this since it never bothered me to type cd and I kinda hate "magic". On an out-of-the-ubuntu-box zsh, it doesn't work: