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
cdhcommand π« β to display a prompt to quickly navigate the history. it's giving "search bar for your past selves". - the
prevdcommand βͺ β to move backward through said history. - the
nextdcommand β© β 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. π
π Copyright π
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