builtin break/continue: support -h/--help argument

These are not generic builtins because we check whether they're inside
a loop. There's no reason to not support "break -h" when we support
"if -h" etc.; do that.
This commit is contained in:
Johannes Altmanninger
2025-09-17 14:49:24 +02:00
parent c77255aabc
commit 87c73b7fbf
4 changed files with 19 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ Description
``break`` halts a currently running loop (*LOOP_CONSTRUCT*), such as a :doc:`for <for>` or :doc:`while <while>` loop. It is usually added inside of a conditional block such as an :doc:`if <if>` block.
There are no parameters for ``break``.
The **-h** or **--help** option displays help about using this command.
Example
-------

View File

@@ -15,6 +15,8 @@ Description
``continue`` skips the remainder of the current iteration of the current inner loop, such as a :doc:`for <for>` loop or a :doc:`while <while>` loop. It is usually added inside of a conditional block such as an :doc:`if <if>` statement or a :doc:`switch <switch>` statement.
The **-h** or **--help** option displays help about using this command.
Example
-------