| `dirs next` | Makes the next directory on the list the active directory. If the current active directory is the last in the list, then cycle to the start of the list. |
| `dirs prev` | Makes the previous directory on the list the active directory. If the current active directory is the first in the list, then cycle to the end of the list. |
When we start using `dirs`, there is only one directory in the list, the active one. You can, as always, change this directory using the `cd` command.
```nu
cd ~
use std/dirs
dirs
# => ╭───┬────────┬─────────────────────────────────╮
# => │ # │ active │ path │
# => ├───┼────────┼─────────────────────────────────┤
# => │ 0 │ true │ /home/myuser │
# => ╰───┴────────┴─────────────────────────────────╯
cd ~/src/repo/nushell
dirs
# => ╭───┬────────┬─────────────────────────────────╮
# => │ # │ active │ path │
# => ├───┼────────┼─────────────────────────────────┤
# => │ 0 │ true │ /home/myuser/repo/nushell │
# => ╰───┴────────┴─────────────────────────────────╯
```
Notice that `cd` only changes the Active directory.
To _add_ the current directory to the list, change to a new active directory using the `dirs add` command:
```nu
dirs add ../reedline
dirs
# => ╭───┬────────┬──────────────────────────────────╮
# => │ # │ active │ path │
# => ├───┼────────┼──────────────────────────────────┤
# => │ 0 │ false │ /home/myuser/src/repo/nushell │
# => │ 1 │ true │ /home/myuser/src/repo/reedline │
# => ╰───┴────────┴──────────────────────────────────╯
```
Let's go ahead and add a few more commonly used directories to the list:
```nu
dirs add ../nu_scripts
dirs add ~
dirs
# => ╭───┬────────┬────────────────────────────────────╮
# => │ # │ active │ path │
# => ├───┼────────┼────────────────────────────────────┤
# => │ 0 │ false │ /home/myuser/src/repo/nushell │
# => │ 1 │ false │ /home/myuser/src/repo/reedline │