LOOP_CONSTRUCT; [COMMANDS ...;] continue; [COMMANDS ...;] end
continue skips the remainder of the current iteration of the current inner loop, such as a for loop or a while loop. It is usually added inside of a conditional block such as an if statement or a switch statement.
The -h or --help option displays help about using this command.
The following code removes all tmp files that do not contain the word smurf.
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
© 2005-2009 Axel Liljencrantz, 2009-2026 fish-shell contributors
Licensed under the GNU General Public License, version 2.
https://fishshell.com/docs/4.5/cmds/continue.html