2019-03-31 17:05:09 +08:00
.. _cmd-nextd:
2018-12-17 09:39:33 +08:00
nextd - move forward through directory history
2019-01-03 12:10:47 +08:00
==============================================
2018-12-17 09:39:33 +08:00
2018-12-18 09:58:24 +08:00
Synopsis
--------
2018-12-17 05:08:41 +08:00
nextd [ -l | --list ] [POS]
2018-12-18 09:58:24 +08:00
2018-12-17 05:08:41 +08:00
2018-12-19 10:44:30 +08:00
Description
2019-01-03 12:10:47 +08:00
-----------
2018-12-17 05:08:41 +08:00
2018-12-20 04:02:45 +08:00
`` nextd `` moves forwards `` POS `` positions in the history of visited directories; if the end of the history has been hit, a warning is printed.
2018-12-17 05:08:41 +08:00
2018-12-20 04:02:45 +08:00
If the `` -l `` or `` --list `` flag is specified, the current directory history is also displayed.
2018-12-17 05:08:41 +08:00
2018-12-20 04:02:45 +08:00
Note that the `` cd `` command limits directory history to the 25 most recently visited directories. The history is stored in the `` $dirprev `` and `` $dirnext `` variables which this command manipulates.
2018-12-17 05:08:41 +08:00
2019-03-31 17:28:13 +08:00
You may be interested in the :ref: `cdh <cmd-cdh>` command which provides a more intuitive way to navigate to recently visited directories.
2018-12-17 05:08:41 +08:00
2018-12-19 10:44:30 +08:00
Example
2019-01-03 12:10:47 +08:00
-------
2018-12-17 05:08:41 +08:00
2018-12-19 11:14:04 +08:00
::
cd /usr/src
# Working directory is now /usr/src
cd /usr/src/fish-shell
# Working directory is now /usr/src/fish-shell
prevd
# Working directory is now /usr/src
nextd
# Working directory is now /usr/src/fish-shell
2018-12-17 05:08:41 +08:00