Spec-Zone.ru › Nushell

metadata access for debug

Access the metadata for the input stream within a closure.

Signature

> metadata access {flags} (closure)

Parameters

  • closure: The closure to run with metadata access.

Input/output types:

input output
any any

Examples

Access metadata and data from a stream together.

> {foo: bar} | to json --raw | metadata access {|meta| {in: $in, content: $meta.content_type}}
╭─────────┬──────────────────╮
│ in      │ {"foo":"bar"}    │
│ content │ application/json │
╰─────────┴──────────────────╯

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

Spec-Zone.ru

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