Home Explore Blog CI



nushell

4th chunk of `commands/docs/describe.md`
004a263b3939ec789746f73d21f21446e631b21d328ff24000000001000016b5
│               │ │              │ │                     │ │ 5 │ int  │ int           │ i64       │     8 │       │ │ │
│               │ │              │ │                     │ ╰───┴──────┴───────────────┴───────────┴───────╯       │ │ │
│               │ │              │ ╰─────────────────────┴────────────────────────────────────────────────────────╯ │ │
│               │ │              │ ╭─────────────────┬────────────────────────────────────────────────────────────╮ │ │
│               │ │ on_save      │ │ type            │ closure                                                    │ │ │
│               │ │              │ │ detailed_type   │ closure                                                    │ │ │
│               │ │              │ │ rust_type       │ &alloc::boxed::Box<nu_protocol::engine::closure::Closure>  │ │ │
│               │ │              │ │ value           │ closure_1                                                  │ │ │
│               │ │              │ │                 │ ╭──────────┬─────────╮                                     │ │ │
│               │ │              │ │ signature       │ │ name     │         │                                     │ │ │
│               │ │              │ │                 │ │ category │ default │                                     │ │ │
│               │ │              │ │                 │ ╰──────────┴─────────╯                                     │ │ │
│               │ │              │ ╰─────────────────┴────────────────────────────────────────────────────────────╯ │ │
│               │ │              │ ╭───────────────┬──────────────────────────────────────────────────────────────╮ │ │
│               │ │ first_commit │ │ type          │ datetime                                                     │ │ │
│               │ │              │ │ detailed_type │ datetime                                                     │ │ │
│               │ │              │ │ rust_type     │ chrono::datetime::DateTime<chrono::offset::fixed::FixedOffse │ │ │
│               │ │              │ │               │ t>                                                           │ │ │
│               │ │              │ │ value         │ 5 years ago                                                  │ │ │
│               │ │              │ ╰───────────────┴──────────────────────────────────────────────────────────────╯ │ │
│               │ │              │ ╭───────────────┬────────────╮                                                   │ │
│               │ │ my_duration  │ │ type          │ duration   │                                                   │ │
│               │ │              │ │ detailed_type │ duration   │                                                   │ │
│               │ │              │ │ rust_type     │ i64        │                                                   │ │
│               │ │              │ │ value         │ 4min 20sec │                                                   │ │
│               │ │              │ ╰───────────────┴────────────╯                                                   │ │
│               │ ╰──────────────┴──────────────────────────────────────────────────────────────────────────────────╯ │
│ rust_type     │ &nu_utils::shared_cow::SharedCow<nu_protocol::value::record::Record>                                │
╰───────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────╯
```

Describe the type of a stream with detailed information
```nu
> [1 2 3] | each {|i| echo $i} | describe -d

```

Describe a stream of data, collecting it first
```nu
> [1 2 3] | each {|i| echo $i} | describe

```

Describe the input but do not collect streams
```nu
> [1 2 3] | each {|i| echo $i} | describe --no-collect

```

Title: Detailed Description of 'on_save' Closure, 'first_commit' Datetime, and 'my_duration' Duration; Examples of 'describe' Command Usage
Summary
The first part provides details about an 'on_save' closure, including its signature, a 'first_commit' datetime with a value of '5 years ago,' and a 'my_duration' duration with a value of '4min 20sec.' The second part presents examples of using the `describe` command to analyze streams, including options for detailed output, stream collection, and avoiding stream collection.