Spec-Zone.ru › Nushell

values for filters

Given a record or table, produce a list of its columns' values.

Signature

> values {flags}

Input/output types:

input output
record list<any>
table list<any>

Examples

Get the values from the record (produce a list).

> { mode:normal userid:31415 } | values
╭───┬────────╮
│ 0 │ normal │
│ 1 │  31415 │
╰───┴────────╯

Values are ordered by the column order of the record.

> { f:250 g:191 c:128 d:1024 e:2000 a:16 b:32 } | values
╭───┬──────╮
│ 0 │  250 │
│ 1 │  191 │
│ 2 │  128 │
│ 3 │ 1024 │
│ 4 │ 2000 │
│ 5 │   16 │
│ 6 │   32 │
╰───┴──────╯

Get the values from the table (produce a list of lists).

> [[name meaning]; [ls list] [mv move] [cd 'change directory']] | values
╭───┬──────────────────────────╮
│ 0 │ ╭───┬────╮               │
│   │ │ 0 │ ls │               │
│   │ │ 1 │ mv │               │
│   │ │ 2 │ cd │               │
│   │ ╰───┴────╯               │
│ 1 │ ╭───┬──────────────────╮ │
│   │ │ 0 │ list             │ │
│   │ │ 1 │ move             │ │
│   │ │ 2 │ change directory │ │
│   │ ╰───┴──────────────────╯ │
╰───┴──────────────────────────╯

Notes

This is a counterpart to columns, which produces a list of columns' names.

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

Spec-Zone.ru

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