mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 07:09:03 +02:00
Auto-generate markdown command docs (#4451)
* Finish updating * a couple improvements * Update renames * cleanup examples
This commit is contained in:
@ -1,32 +1,18 @@
|
||||
# do
|
||||
Runs a block, optionally ignoring errors.
|
||||
---
|
||||
title: do
|
||||
layout: command
|
||||
version: 0.59.0
|
||||
---
|
||||
|
||||
## Usage
|
||||
```shell
|
||||
> do <block> ...args {flags}
|
||||
```
|
||||
Run a block
|
||||
|
||||
## Signature
|
||||
|
||||
```> do (block) ...rest --ignore-errors```
|
||||
|
||||
## 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
|
||||
```shell
|
||||
> do { echo hello }
|
||||
```
|
||||
|
||||
Run the block and ignore errors
|
||||
```shell
|
||||
> do -i { thisisnotarealcommand }
|
||||
```
|
||||
|
||||
Run the block with a parameter
|
||||
```shell
|
||||
> do { |x| $x + 100 } 55
|
||||
```
|
||||
- `block`: the block to run
|
||||
- `...rest`: the parameter(s) for the block
|
||||
- `--ignore-errors`: ignore errors as the block runs
|
||||
|
||||
|
Reference in New Issue
Block a user