Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 615 Bytes

configure-cd-to-behave-like-pushd-in-zsh.md

File metadata and controls

16 lines (12 loc) · 615 Bytes

Configure cd To Behave Like pushd In Zsh

The Zsh environment has a setting that allows you to make the cd command behave like the pushd command. Normally when you use cd the remembered directory stack is not effected. However, if you add the following setting to your ~/.zshrc file:

setopt auto_pushd

then using cd to navigate directories will cause those directories to be added to the dirs stack.

This is the default in the oh-my-zsh configuration of zsh.