Unless you’re seven directories deep and accidentally hit the <enter> button instead of the <shift> button.
In which case, uh, you want the current functionality.
In which case, uh, you want the current functionality.
- "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.