How to install pushd, popd commands for MacOS?

Tried brew search pushd, brew search popd, no dice. OS version MacOS 10.12 Sierra.


Solution 1:

I have no OSX Sierra but pushd and popd are usually builtins, not commands. If you miss them, then you shell does not provide them. Also, usually OSX fires a graphical message when attempting to use a command which is not yet installed but supported and tells you how to install it.

You can still create your own fully-compatible shell functions to handle that.