.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "CDH" "1" "Nov 13, 2025" "4.2" "fish-shell" .SH NAME cdh \- change to a recently visited directory .SH SYNOPSIS .nf \fBcdh\fP [\fIDIRECTORY\fP] .fi .sp .SH DESCRIPTION .sp \fBcdh\fP with no arguments presents a list of \fI\%recently visited directories\fP\&. You can then select one of the entries by letter or number. You can also press \fBtab\fP to use the completion pager to select an item from the list. If you give it a single argument it is equivalent to \fBcd DIRECTORY\fP\&. .sp Note that the \fBcd\fP command limits directory history to the 25 most recently visited directories. The history is stored in the \fBdirprev\fP and \fBdirnext\fP variables, which this command manipulates. If you make those universal variables, your \fBcd\fP history is shared among all fish instances. .SH SEE ALSO .INDENT 0.0 .IP \(bu 2 the \fI\%dirh\fP command to print the directory history .IP \(bu 2 the \fI\%prevd\fP command to move backward .IP \(bu 2 the \fI\%nextd\fP command to move forward .UNINDENT .SH COPYRIGHT fish-shell developers .\" Generated by docutils manpage writer. .