2021-12-11 00:41:09 -08:00
|
|
|
.. _cmd-cdh:
|
2019-03-31 11:05:09 +02:00
|
|
|
|
2018-12-16 17:39:33 -08:00
|
|
|
cdh - change to a recently visited directory
|
2019-01-02 20:10:47 -08:00
|
|
|
============================================
|
2018-12-16 17:39:33 -08:00
|
|
|
|
2018-12-17 17:58:24 -08:00
|
|
|
Synopsis
|
|
|
|
|
--------
|
|
|
|
|
|
2021-12-09 04:45:10 -08:00
|
|
|
``cdh`` [ *DIR* ]
|
2018-12-17 17:58:24 -08:00
|
|
|
|
2018-12-18 18:44:30 -08:00
|
|
|
Description
|
2019-01-02 20:10:47 -08:00
|
|
|
-----------
|
2018-12-16 13:08:41 -08:00
|
|
|
|
2021-12-09 04:45:10 -08:00
|
|
|
``cdh`` with no arguments presents a list of :ref:`recently visited directories <directory-history>`.
|
|
|
|
|
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 DIR``.
|
2018-12-16 13:08:41 -08:00
|
|
|
|
2021-12-09 04:45:10 -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.
|
|
|
|
|
If you make those universal variables your ``cd`` history is shared among all fish instances.
|
2018-12-16 13:08:41 -08:00
|
|
|
|
2018-12-18 18:44:30 -08:00
|
|
|
See Also
|
2019-01-02 20:10:47 -08:00
|
|
|
--------
|
2018-12-16 13:08:41 -08:00
|
|
|
|
2020-04-04 13:01:53 +02:00
|
|
|
- the :ref:`dirh <cmd-dirh>` command to print the directory history
|
|
|
|
|
- the :ref:`prevd <cmd-prevd>` command to move backward
|
|
|
|
|
- the :ref:`nextd <cmd-nextd>` command to move forward
|