Spec-Zone.ru › Nushell

wrap for filters

Wrap the value into a column.

Signature

> wrap {flags} (name)

Parameters

  • name: The name of the column.

Input/output types:

input output
list<any> table
range table
any record

Examples

Wrap a list into a table with a given column name.

> [ Pachisi Mahjong Catan Carcassonne ] | wrap game
╭───┬─────────────╮
│ # │    game     │
├───┼─────────────┤
│ 0 │ Pachisi     │
│ 1 │ Mahjong     │
│ 2 │ Catan       │
│ 3 │ Carcassonne │
╰───┴─────────────╯

Wrap a range into a table with a given column name.

> 4..6 | wrap num
╭───┬─────╮
│ # │ num │
├───┼─────┤
│ 0 │   4 │
│ 1 │   5 │
│ 2 │   6 │
╰───┴─────╯

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/wrap.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API