fish-shell/sphinx_doc_src/cmds/cdh.rst
David Adam 02d82dcf85 docs: update all command synopsis formatting
Adds synopses for those commands missing them.

Moves all synopsis sections to code blocks. This improves the appearance, although highlighting as
fish code may not be the ideal appearance.
2019-09-17 17:59:04 +08:00

24 lines
966 B
ReStructuredText

.. _cmd-cdh:
cdh - change to a recently visited directory
============================================
Synopsis
--------
::
cdh [ directory ]
Description
-----------
``cdh`` with no arguments presents a list of recently visited directories. You can then select one of the entries by letter or number. You can also press :kbd:`tab` to use the completion pager to select an item from the list. If you give it a single argument it is equivalent to ``cd directory``.
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. If you make those universal variables your ``cd`` history is shared among all fish instances.
See Also
--------
See also the :ref:`prevd <cmd-prevd>` and :ref:`pushd <cmd-pushd>` commands which also work with the recent ``cd`` history and are provided for compatibility with other shells.