Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

metadata set for debug

Set the metadata for items in the stream.

Signature

> metadata set {flags}

Flags

  • --datasource-ls, -l: Assign the DataSource::Ls metadata to the input
  • --datasource-filepath, -f {path}: Assign the DataSource::FilePath metadata to the input
  • --content-type, -c {string}: Assign content type metadata to the input

Input/output types:

inputoutput
anyany

Examples

Set the metadata of a table literal

> [[name color]; [Cargo.lock '#ff0000'] [Cargo.toml '#00ff00'] [README.md '#0000ff']] | metadata set --datasource-ls

Set the metadata of a file path

> 'crates' | metadata set --datasource-filepath $'(pwd)/crates' | metadata

Set the metadata of a file path

> 'crates' | metadata set --content-type text/plain | metadata
╭──────────────┬────────────╮
│ content_type │ text/plain │
╰──────────────┴────────────╯