OS Manuals

dirh(1)

dirh - print directory history

DIRH(1) fish-shell DIRH(1)

dirh - print directory history

dirh

dirh prints the current directory history <#directory-history>. The current position in the history is highlighted using the color defined in the fish_color_history_current environment variable.

dirh does not accept any parameters.

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.

  • the cdh <> command to display a prompt to quickly navigate the history
  • the prevd <> command to move backward
  • the nextd <> command to move forward

fish-shell developers

September 9, 2026 4.9

fish 4.9.3-r0 · os · ingested 2026-09-30