pushd---ディレクトリを突っ込む
$ pushd ~/Documents ~/Documents ~ $ pushd ~/Downloads ~/Downloads ~/Documents ~
dir 突っ込んだディレクトリを確認する
$ dirs ~/Downloads ~/Documents ~
表示オプションを使うと、少し可視性がよくなります
$ dirs -p ~/Downloads ~/Documents ~ $ dirs -v 0 ~/Downloads 1 ~/Documents 2 ~ $ dirs -l /Users/shuzo/Downloads /Users/shuzo/Documents /Users/shuzo
引数に数値をつけてあげれば、番号を取り出す事も。
ディレクトリのリマインダとして使うのもアリかもしれませんね
$ dirs -1 ~/Documents $ dirs -2 ~/Downloads $ dirs -3 bash: dirs: 3: directory stack index out of range
popd---突っ込んだものを取り出す
$ dirs ~/Downloads ~/Documents ~ bash@Downloads$ popd ~/Documents ~ bash@Documents$ popd ~ bash@~$ popd bash: popd: directory stack empty