doc: add section about directory history / stack

This PR also adds "See Also" section in the related commands.
This commit is contained in:
Delapouite
2020-04-04 13:01:53 +02:00
committed by Fabian Homborg
parent d2cc59dc73
commit 8d20748f4a
10 changed files with 90 additions and 39 deletions

View File

@@ -10,23 +10,18 @@ Synopsis
nextd [ -l | --list ] [POS]
Description
-----------
``nextd`` moves forwards ``POS`` positions in the history of visited directories; if the end of the history has been hit, a warning is printed.
``nextd`` moves forwards ``POS`` positions in the :ref:`history of visited directories <directory-history>`; if the end of the history has been hit, a warning is printed.
If the ``-l`` or ``--list`` flag is specified, the current directory history is also displayed.
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.
You may be interested in the :ref:`cdh <cmd-cdh>` command which provides a more intuitive way to navigate to recently visited directories.
Example
-------
::
cd /usr/src
@@ -41,3 +36,9 @@ Example
nextd
# Working directory is now /usr/src/fish-shell
See Also
--------
- the :ref:`cdh <cmd-cdh>` command to display a prompt to quickly navigate the history
- the :ref:`dirh <cmd-dirh>` command to print the directory history
- the :ref:`prevd <cmd-prevd>` command to move backward