1

I am using zsh in Babun (Cygwin with oh-my-zsh and some extras).

I noticed some odd behavior, it looks like cd is behaving like pushd?

{ ~ }  » mkdir foo
{ ~ }  » pushd foo
~/foo ~
{ foo }  » popd
~

The above is fine and expected, but see the below.

{ ~ }  » cd foo
{ foo }  » dirs
~/foo ~

I tried checking if there was some alias being set somewhere, but I saw no such thing.

{ foo }  » alias | egrep "(cd|pushd)"
-='cd -'
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
6='cd -6'
7='cd -7'
8='cd -8'
9='cd -9'
grt='cd $(git rev-parse --show-toplevel || echo ".")'
pu=pushd

Why is my cd appending dirs? It's not really a problem, I am more just curious.

3

I see now. oh-my-zsh does setopt auto_pushd which is described here as:

AUTO_PUSHD (-N)

  • Make cd push the old directory onto the directory stack.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.