nushell/crates/nu-std/lib
Antoine Stevan 35c8485442
FEATURE: add --expand to std clip (#8970)
# Description
i use `std clip` to copy everything from `nushell`.
however i have the auto-expand on tables enabled and when i use `clip`
on large tables, it does not copy what i see but the collapsed data => i
have to edit the line and add `| table --expand` manually, which is a
pain to do regularly 😱

in this PR, i just add `--expand` to `std clip` to automatically expand
the data before copying it 😋

# User-Facing Changes
exploring the `Cargo.toml` of `nushell` with auto-expand, one might see
```
> open Cargo.toml | get package.metadata.binstall.overrides
╭────────────────────────┬───────────────────╮
│                        │ ╭─────────┬─────╮ │
│ x86_64-pc-windows-msvc │ │ pkg-fmt │ zip │ │
│                        │ ╰─────────┴─────╯ │
╰────────────────────────┴───────────────────╯
```
but then
```
open Cargo.toml | get package.metadata.binstall.overrides | clip
```
would only copy
```
╭────────────────────────┬──────────────────╮
│ x86_64-pc-windows-msvc │ {record 1 field} │
╰────────────────────────┴──────────────────╯
```
...

now 
```
open Cargo.toml | get package.metadata.binstall.overrides | clip --expand
```
will copy the expanded record 👍 

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
-  `toolkit test`
-  `toolkit test stdlib`

# After Submitting
```
$nothing
```
2023-04-28 09:07:38 +02:00
..
dirs.nu stdlib: refactor into a multi-module library (#8815) 2023-04-09 20:00:20 +03:00
help.nu stdlib: add completion to help commands (#8799) 2023-04-10 10:59:57 +12:00
iter.nu add filter-map command to std iter (#8926) 2023-04-19 19:09:10 +02:00
log.nu stdlib: refactor into a multi-module library (#8815) 2023-04-09 20:00:20 +03:00
mod.nu FEATURE: add --expand to std clip (#8970) 2023-04-28 09:07:38 +02:00
testing.nu std run-tests: Rename --command switch to --test; and likewise in --list output (#8895) 2023-04-20 19:41:33 -05:00
xml.nu stdlib: refactor into a multi-module library (#8815) 2023-04-09 20:00:20 +03:00