DIRH(1)

✨ DIRH(1) β€” the fish-shell girlies know ✨

okay so real talk, this page is dirh from fish-shell, and it's genuinely one of the most underrated little tools ever. no cap.


🌸 NAME 🌸

dirh β€” print directory history πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

dirh

that's it. that's the whole synopsis. iconic behavior honestly.


πŸ’– DESCRIPTION πŸ’–

dirh prints your current directory history. that's it, that's the job, and she does it flawlessly.

the current position in the history gets highlighted using the color defined in the fish_color_history_current environment variable β€” so yeah, if your history looks cursed, go yell at that variable, not at dirh. 🎨

lowkey important: dirh does not accept any parameters. none. zero. she takes no notes. don't try to hand her arguments, she will not be accepting them. πŸ™ˆ

also bestie, heads up: the cd command limits directory history to the 25 most recently visited directories. so like, it's not infinite, it's a curated little collection. the history itself is stored in the $dirprev and $dirnext variables β€” that's where the magic lives. ✨


πŸ¦‹ SEE ALSO πŸ¦‹

  • the cdh command πŸ’« β€” to display a prompt to quickly navigate the history. it's giving "search bar for your past selves".
  • the prevd command βͺ β€” to move backward through said history.
  • the nextd command ⏩ β€” to move forward through it.

like, dirh shows you where you've been, prevd/nextd walk you around, and cdh lets you pick from a menu. the whole friend group ate. πŸ‘‘


fish-shell developers β€” shoutout to them fr fr. 🫢


okay that's the whole page bestie, go forth and know your directory history πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

this was DIRH(1) from fish-shell, version 4.9, dated Sep 08, 2026 β€” mwah, bye! πŸ’…πŸ“

πŸ“¦ where this page comes from
  • arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms