POPD(1)
π POPD β the fish-shell manual, section 1 π
okay so bestie, gather round, because we're talking about popd β a whole icon from the fish-shell manual, section 1, no cap. she's small, she's mighty, and she's about to reorganize your whole life (your directory stack, specifically). π
β¨ NAME β¨
popd β move through the directory stack π¦
like, the name is literally the whole vibe. pop. dir. pop the dir. slay.
πΈ SYNOPSIS πΈ
popd
that's it. that's the whole thing. no flags required, no drama, just vibes and one command. π
π DESCRIPTION π
okay so here's the tea β β popd removes the top directory from the directory stack <# directory-stack> and then changes the working directory to the new top directory. it's giving "you're done here, next up" energy. literally the main character of stack management. π
and if you ever wanna add directories to the stack instead of yeeting them off? that's pushd <>'s job. they're a duo. iykyk. π«Ά
also!! the -h or --help option displays help about using this command. so if you're ever like "wait what does this do again" β she will literally tell you herself. self-aware queen. πβ¨
π¦ EXAMPLE π¦
okay this is the part where it all clicks, watch this:
pushd /usr/src
# Working directory is now /usr/src
# Directory stack contains /usr/src
pushd /usr/src/fish-shell
# Working directory is now /usr/src/fish-shell
# Directory stack contains /usr/src /usr/src/fish-shell
popd
# Working directory is now /usr/src
# Directory stack contains /usr/src
see how we stacked it up and then popped right back? π₯ the way popd just knew where to put us. ate and left no crumbs, fr fr. π
π SEE ALSO π
dirs<> β the command that prints the directory stack, so you can actually see what you're working with. vibe check your stack bestie πcdh<> β a whole other command that gives you a more intuitive way to navigate to recently visited directories. lowkey iconic of her honestly π
π Copyright π
fish-shell developers β legends, every single one of them. ππ
ngl bestie, popd is one of those commands that looks tiny and then turns out to be carrying the entire navigation experience on her back. respect the process. π§ββοΈ
that's the page!! brought to you by fish-shell version 4.9, dated Sep 08, 2026 β stamp it, frame it, put it on the fridge. ππβ¨
π¦ 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