CONTINUE(1)
β¨ CONTINUE(1) β¨
okay bestie, so this is continue from the fish-shell manual, and honestly? she's a tiny little icon and she runs the whole vibe of your loops. π
πΈ NAME πΈ
continue β skips the rest of the current iteration of the current inner loop. that's it, that's the whole gig. no cap. π
π¦ SYNOPSIS π¦
LOOP_CONSTRUCT; [COMMANDS ...;] continue; [COMMANDS ...;] end
π DESCRIPTION π
so continue literally just bails out of the rest of the current iteration of the current inner loop β like a for loop or a while loop. it doesn't nuke the whole loop, she's not that dramatic (that's break's job, more on her later π). she just goes "nope, skipping to the next round" and keeps the party going. π₯
and the way she's normally used? you tuck her inside a conditional block, like an if statement or a switch statement, so she only bounces when the vibes call for it. conditional queen energy fr fr. π
also!! the -h or --help option displays help about using this command. handy when you forget stuff, which, relatable. π
β EXAMPLE β
this little number clears out all your tmp files that don't contain the word smurf. and the continue is the main character here, obviously:
for i in *.tmp
if grep smurf $i
continue
end
# This "rm" is skipped over if "continue" is executed.
rm $i
# As is this "echo"
echo $i
end
see how the comments spell it out? if continue fires, the rm gets skipped over β and the echo too. both just β¨goneβ¨. that's her whole thing: anything below her in that iteration? not happening. slay. π¦
π«Ά SEE ALSO π«Ά
- the
breakcommand β for when you wanna stop the current inner loop entirely instead of just skipping one round. she's the louder sister, iykyk. π
π COPYRIGHT π
Copyright Β© fish-shell developers. give credit where it's due bestie. π
so yeah, that's continue β fish-shell manual, version 4.9, dated Sep 08, 2026. go forth and loop responsibly, my little shell gremlin. πβ¨π
π¦ 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