mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 02:18:53 +02:00
Auto-generate markdown command docs (#4451)
* Finish updating * a couple improvements * Update renames * cleanup examples
This commit is contained in:
30
docs/commands/each_window.md
Normal file
30
docs/commands/each_window.md
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
title: each window
|
||||
layout: command
|
||||
version: 0.59.0
|
||||
---
|
||||
|
||||
Runs a block on window groups of `window_size` that slide by n rows.
|
||||
|
||||
## Signature
|
||||
|
||||
```> each window (window_size) (block) --stride```
|
||||
|
||||
## Parameters
|
||||
|
||||
- `window_size`: the size of each window
|
||||
- `block`: the block to run on each window
|
||||
- `--stride {int}`: the number of rows to slide over between windows
|
||||
|
||||
## Examples
|
||||
|
||||
A sliding window of two elements
|
||||
```shell
|
||||
> echo [1 2 3 4] | each window 2 { $it.0 + $it.1 }
|
||||
```
|
||||
|
||||
A sliding window of two elements, with a stride of 3
|
||||
```shell
|
||||
> [1, 2, 3, 4, 5, 6, 7, 8] | each window 2 --stride 3 { |x| $x.0 + $x.1 }
|
||||
```
|
||||
|
Reference in New Issue
Block a user