mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 04:41:14 -03:00
doc: add section about directory history / stack
This PR also adds "See Also" section in the related commands.
This commit is contained in:
committed by
Fabian Homborg
parent
d2cc59dc73
commit
8d20748f4a
@@ -13,7 +13,7 @@ Synopsis
|
||||
Description
|
||||
-----------
|
||||
|
||||
The ``pushd`` function adds ``DIRECTORY`` to the top of the directory stack and makes it the current working directory. :ref:`popd <cmd-popd>` will pop it off and return to the original directory.
|
||||
The ``pushd`` function adds ``DIRECTORY`` to the top of the :ref:`directory stack <directory-stack>` and makes it the current working directory. :ref:`popd <cmd-popd>` will pop it off and return to the original directory.
|
||||
|
||||
Without arguments, it exchanges the top two directories in the stack.
|
||||
|
||||
@@ -21,10 +21,6 @@ Without arguments, it exchanges the top two directories in the stack.
|
||||
|
||||
``pushd -NUMBER`` rotates clockwise i.e. top to bottom.
|
||||
|
||||
See also :ref:`dirs <cmd-dirs>` to print the stack and ``dirs -c`` to clear it.
|
||||
|
||||
You may be interested in the :ref:`cdh <cmd-cdh>` command which provides a more intuitive way to navigate to recently visited directories.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
@@ -49,3 +45,9 @@ Example
|
||||
popd
|
||||
# Working directory is now /usr/src/fish-shell
|
||||
# Directory stack contains /usr/src/fish-shell /tmp
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- the :ref:`dirs <cmd-dirs>` command to print the directory stack
|
||||
- the :ref:`cdh <cmd-cdh>` command which provides a more intuitive way to navigate to recently visited directories.
|
||||
|
||||
Reference in New Issue
Block a user