2019-03-31 09:05:09 +00:00
.. _cmd-prevd:
2018-12-17 01:39:33 +00:00
prevd - move backward through directory history
2019-01-03 04:10:47 +00:00
===============================================
2018-12-17 01:39:33 +00:00
2018-12-18 01:58:24 +00:00
Synopsis
--------
2018-12-16 21:08:41 +00:00
2019-09-17 09:59:04 +00:00
::
2018-12-18 01:58:24 +00:00
2019-09-17 09:59:04 +00:00
prevd [ -l | --list ] [POS]
2018-12-16 21:08:41 +00:00
2018-12-19 02:44:30 +00:00
Description
2019-01-03 04:10:47 +00:00
-----------
2018-12-16 21:08:41 +00:00
2020-04-04 11:01:53 +00:00
`` prevd `` moves backwards `` POS `` positions in the :ref: `history of visited directories <directory-history>` ; if the beginning of the history has been hit, a warning is printed.
2018-12-16 21:08:41 +00:00
2018-12-19 20:02:45 +00:00
If the `` -l `` or `` --list `` flag is specified, the current history is also displayed.
2018-12-16 21:08:41 +00:00
2018-12-19 20:02:45 +00: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-16 21:08:41 +00:00
2018-12-19 02:44:30 +00:00
Example
2019-01-03 04:10:47 +00:00
-------
2018-12-16 21:08:41 +00:00
2018-12-19 03:14:04 +00:00
::
cd /usr/src
# Working directory is now /usr/src
2019-09-17 08:50:52 +00:00
2018-12-19 03:14:04 +00:00
cd /usr/src/fish-shell
# Working directory is now /usr/src/fish-shell
2019-09-17 08:50:52 +00:00
2018-12-19 03:14:04 +00:00
prevd
# Working directory is now /usr/src
2019-09-17 08:50:52 +00:00
2018-12-19 03:14:04 +00:00
nextd
# Working directory is now /usr/src/fish-shell
2018-12-16 21:08:41 +00:00
2020-04-04 11:01:53 +00:00
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: `nextd <cmd-nextd>` command to move forward