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
    • Deprecated
    • Env
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

describe for core

Describe the type and structure of the value(s) piped in.

Signature

> describe {flags}

Flags

  • --no-collect, -n: do not collect streams of structured data
  • --detailed, -d: show detailed information about the value

Input/output types:

inputoutput
anyany

Examples

Describe the type of a string

> 'hello' | describe
string

Describe the type of a record in a detailed way

> {shell:'true', uwu:true, features: {bugs:false, multiplatform:true, speed: 10}, fib: [1 1 2 3 5 8], on_save: {|x| $'Saving ($x)'}, first_commit: 2019-05-10, my_duration: (4min + 20sec)} | describe -d
╭─────────┬───────────────────────────────────────────────────────────╮
│ type    │ record                                                    │
│         │ ╭──────────────┬────────────────────────────────────────╮ │
│ columns │ │ shell        │ string                                 │ │
│         │ │ uwu          │ bool                                   │ │
│         │ │              │ ╭─────────┬──────────────────────────╮ │ │
│         │ │ features     │ │ type    │ record                   │ │ │
│         │ │              │ │         │ ╭───────────────┬──────╮ │ │ │
│         │ │              │ │ columns │ │ bugs          │ bool │ │ │ │
│         │ │              │ │         │ │ multiplatform │ bool │ │ │ │
│         │ │              │ │         │ │ speed         │ int  │ │ │ │
│         │ │              │ │         │ ╰───────────────┴──────╯ │ │ │
│         │ │              │ ╰─────────┴──────────────────────────╯ │ │
│         │ │              │ ╭────────┬─────────────╮               │ │
│         │ │ fib          │ │ type   │ list        │               │ │
│         │ │              │ │ length │ 6           │               │ │
│         │ │              │ │        │ ╭───┬─────╮ │               │ │
│         │ │              │ │ values │ │ 0 │ int │ │               │ │
│         │ │              │ │        │ │ 1 │ int │ │               │ │
│         │ │              │ │        │ │ 2 │ int │ │               │ │
│         │ │              │ │        │ │ 3 │ int │ │               │ │
│         │ │              │ │        │ │ 4 │ int │ │               │ │
│         │ │              │ │        │ │ 5 │ int │ │               │ │
│         │ │              │ │        │ ╰───┴─────╯ │               │ │
│         │ │              │ ╰────────┴─────────────╯               │ │
│         │ │              │ ╭───────────┬────────────────────────╮ │ │
│         │ │ on_save      │ │ type      │ closure                │ │ │
│         │ │              │ │           │ ╭──────────┬─────────╮ │ │ │
│         │ │              │ │ signature │ │ name     │         │ │ │ │
│         │ │              │ │           │ │ category │ default │ │ │ │
│         │ │              │ │           │ ╰──────────┴─────────╯ │ │ │
│         │ │              │ ╰───────────┴────────────────────────╯ │ │
│         │ │ first_commit │ date                                   │ │
│         │ │ my_duration  │ duration                               │ │
│         │ ╰──────────────┴────────────────────────────────────────╯ │
╰─────────┴───────────────────────────────────────────────────────────╯

Describe the type of a stream with detailed information

> [1 2 3] | each {|i| echo $i} | describe -d

Describe a stream of data, collecting it first

> [1 2 3] | each {|i| echo $i} | describe

Describe the input but do not collect streams

> [1 2 3] | each {|i| echo $i} | describe --no-collect
Edit this page on GitHub
Contributors: JT, hustcer, Reilly Wood, Justin Ma, Leon, Hofer-Julian, Stefan Holderbach, Texas Toland, sholderbach