nushell/docs/commands/do.md
JT bff81f24aa
Autogenerate missing docs (#3514)
* Autogenerate missing docs

* Update ansi.md

* Rename question mark command docs

* Delete empty?.md
2021-05-30 12:57:04 +12:00

513 B

do

Runs a block, optionally ignoring errors.

Usage

> do <block> ...args {flags} 

Parameters

  • <block> the block to run
  • ...args: the parameter(s) for the block

Flags

  • -h, --help: Display this help message
  • -i, --ignore-errors: ignore errors as the block runs

Examples

Run the block

> do { echo hello }

Run the block and ignore errors

> do -i { thisisnotarealcommand }

Run the block with a parameter

> do { |x| $x + 100 } 55