File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
10
10
For a steady stream of TILs from a variety of rocketeers, checkout
11
11
[ til.hashrocket.com] ( https://til.hashrocket.com/ ) .
12
12
13
- _ 755 TILs and counting..._
13
+ _ 756 TILs and counting..._
14
14
15
15
---
16
16
@@ -671,6 +671,7 @@ _755 TILs and counting..._
671
671
- [ Check The Current Working Directory] ( unix/check-the-current-working-directory.md )
672
672
- [ Clear The Screen] ( unix/clear-the-screen.md )
673
673
- [ Command Line Length Limitations] ( unix/command-line-length-limitations.md )
674
+ - [ Configure cd To Behave Like pushd In Zsh] ( unix/configure-cd-to-behave-like-pushd-in-zsh.md )
674
675
- [ Copying File Contents To System Paste Buffer] ( unix/copying-file-contents-to-system-paste-buffer.md )
675
676
- [ Create A File Descriptor with Process Substitution] ( unix/create-a-file-descriptor-with-process-substitution.md )
676
677
- [ Curling For Headers] ( unix/curling-for-headers.md )
Original file line number Diff line number Diff line change
1
+ # Configure cd To Behave Like pushd In Zsh
2
+
3
+ The Zsh environment has a setting that allows you to make the ` cd ` command
4
+ behave like the ` pushd ` command. Normally when you use ` cd ` the [ remembered
5
+ directory stack] ( list-the-stack-of-remembered-directories.md ) is not
6
+ effected. However, if you add the following setting to your ` ~/.zshrc ` file:
7
+
8
+ ``` bash
9
+ setopt auto_pushd
10
+ ```
11
+
12
+ then using ` cd ` to navigate directories will cause those directories to be
13
+ added to the ` dirs ` stack.
14
+
15
+ This is the default in the [ oh-my-zsh configuration of
16
+ zsh] ( https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/directories.zsh#L2 ) .
You can’t perform that action at this time.
0 commit comments