2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: do
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Run a block
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
```> do (block) ...rest --ignore-errors```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Parameters
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `block`: the block to run
|
|
|
|
- `...rest`: the parameter(s) for the block
|
|
|
|
- `--ignore-errors`: ignore errors as the block runs
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-20 01:13:33 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Run the block
|
|
|
|
```shell
|
|
|
|
> do { echo hello }
|
|
|
|
```
|
|
|
|
|
|
|
|
Run the block and ignore errors
|
|
|
|
```shell
|
|
|
|
> do -i { thisisnotarealcommand }
|
|
|
|
```
|