break

For core.

Break a loop.

Command Type

keyword

Signature

> break {flags}

Input/output types:

input output
nothing nothing

Examples

Break out of a loop.

> loop { break }

Notes

This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html

break can only be used in while, loop, and for loops. It can not be used with each or other filter commands

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.