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 break command β€” for when you wanna stop the current inner loop entirely instead of just skipping one round. she's the louder sister, iykyk. πŸ’€

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