NEXTD(1)
β¨ NEXTD(1) β the fish-shell glow-up page β¨
okay so bestie, welcome to nextd, a lil fish-shell icon from section 1 of the manual π
she's the forward button on your directory time machine, and honestly? she ate.
π¦ NAME π¦
nextd β move forward through directory history. yeah. that's her whole thing. main character energy only π
πΈ SYNOPSIS πΈ
nextd [-l | --list] [POS]
π DESCRIPTION π
so here's the vibe: nextd moves forwards POS positions in the history of visited directories (that's the <#directory-history> situation, iykyk) π§ and if you've hit the end of the history? a warning gets printed. not her being dramatic, she's just telling you there's nowhere left to go π
if you pass the -l or --list option, the current directory history gets displayed too β like a little peek behind the curtain β¨
the -h or --help option displays help about using this command, because even icons need a help menu π«Ά
heads up bestie: thecdcommand limits directory history to the 25 most recently visited directories β that's the cap, no cap. the history is stored in thedirprevanddirnextvariables, which this command manipulates. so yeah, she's in there moving your variables around and she's slaying while doing it π
π₯ EXAMPLE π₯
like, literally just watch:
cd /usr/src
# Working directory is now /usr/src
cd /usr/src/fish-shell
# Working directory is now /usr/src/fish-shell
prevd
# Working directory is now /usr/src
nextd
# Working directory is now /usr/src/fish-shell
see how she justβ¦ went back? obsessed π that's the whole trick. prevd goes back, nextd goes forward, and everyone lives happily ever after π
π SEE ALSO π
- the
cdhcommand to display a prompt to quickly navigate the history π - the
dirhcommand to print the directory history πΈ - the
prevdcommand to move backward π
π Copyright π
fish-shell developers β iconic of them, honestly.
and that's the page, bestie! this was NEXTD(1) from the fish-shell manual, version 4.9, dated Sep 08, 2026 β so go forth, move forward through your directory history, and remember: if the warning prints, you've reached the end, and that's simply the universe telling you to cd somewhere new π
β¨π¦
π¦ 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