2 ms·
It only swaps; you can use pushd and popd if you want a stack.
by kbp 8y ago
It only swaps; you can use pushd and popd if you want a stack.
- kazinator 8y agoAlso: - "cd -" has no interaction with the pushd/popd stack except in the sense that it alters the top of the stack (the current working dir). It doesn't swap the two top entries of the directory stack, but swaps the top with an off-stack saved location ($OLDPWD). - "pushd" with no arguments swaps the top two stack entries.