W3cubDocs

/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
any record
list<any> table
range table

Examples

Wrap a list into a table with a given column name

> [123] |wrapnum
╭───┬─────╮
# │ num │
├───┼─────┤
01
12
23
╰───┴─────╯

Wrap a range into a table with a given column name

>1..3|wrapnum
╭───┬─────╮
# │ num │
├───┼─────┤
01
12
23
╰───┴─────╯

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