nushell/crates/nu-command/src
Bahex 5615d21ce9
remove content_type metadata from pipeline after from ... commands (#14602)
# Description

`from ...` conversions pass along all metadata except `content_type`,
which they set to `None`.

## Rationale

`open`ing a file results in no `content_type` metadata if it can be
parsed into a nu data structure, and using `open --raw` results in
`content_type` metadata.

`from ...` commands should preserve metadata ***except*** for
`content_type`, as after parsing it's no longer that `content_type` and
just structured nu data.

These commands should return identical data *and* identical metadata

```nushell
open foo.csv
```

```nushell
open foo.csv --raw | from csv
```

# User-Facing Changes

N/A

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

# After Submitting
N/A
2024-12-16 15:59:18 -06:00
..
bytes Remove duplicate implementations of CallExt::rest (#14484) 2024-12-01 15:03:45 +01:00
charting Add Filesize type (#14369) 2024-11-29 21:24:17 +00:00
conversions Deprecate date to-record and date to-table (#14319) 2024-11-29 23:06:26 +01:00
database Add Filesize type (#14369) 2024-11-29 21:24:17 +00:00
date Deprecate date to-record and date to-table (#14319) 2024-11-29 23:06:26 +01:00
debug Make timeit take only closures as an argument (#14483) 2024-12-10 23:08:53 +08:00
env Start to Add WASM Support Again (#14418) 2024-11-30 07:57:11 -06:00
experimental Start to Add WASM Support Again (#14418) 2024-11-30 07:57:11 -06:00
filesystem Revert "Feature: PWD-per-drive to facilitate working on multiple drives at Windows" (#14598) 2024-12-16 13:52:07 -06:00
filters remove the deprecated index argument from filter commands' closure signature (#14594) 2024-12-15 15:27:13 -06:00
formats remove content_type metadata from pipeline after from ... commands (#14602) 2024-12-16 15:59:18 -06:00
generators Seq char update will work on all char (#14261) 2024-11-15 21:05:29 +01:00
hash add binary as input to hash commands (#13923) 2024-09-25 16:47:52 +08:00
help Change help commands to use name from scope instead of the name from the declaration (#14490) 2024-12-10 09:27:30 -06:00
math Add Filesize type (#14369) 2024-11-29 21:24:17 +00:00
misc Add environment variables for sourced files (#14486) 2024-12-02 06:19:20 -06:00
network Start to Add WASM Support Again (#14418) 2024-11-30 07:57:11 -06:00
path Add path self command for getting absolute paths to files at parse time (#14303) 2024-12-06 08:19:08 -06:00
platform du: add -l/--long flag, remove -a/--all flag (#14407) 2024-12-10 11:22:56 -06:00
random Add Filesize type (#14369) 2024-11-29 21:24:17 +00:00
removed Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
shells Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
stor feat: stor insert accepts lists (#14175) 2024-10-29 06:32:55 -05:00
strings update unicode-width to 0.2 (#14456) 2024-11-29 09:09:45 +08:00
system Revert "fix: make exec command decrement SHLVL correctly" (#14580) 2024-12-13 18:34:33 -06:00
viewers Fix table command when targeting WASM (#14530) 2024-12-10 06:10:28 -06:00
default_context.rs Add path self command for getting absolute paths to files at parse time (#14303) 2024-12-06 08:19:08 -06:00
example_test.rs Overhaul $in expressions (#13357) 2024-07-17 16:02:42 -05:00
lib.rs Start to Add WASM Support Again (#14418) 2024-11-30 07:57:11 -06:00
progress_bar.rs Cut down unnecessary lint allows (#14335) 2024-11-15 19:24:39 +01:00
sort_utils.rs Rework sorting and add cell path and closure comparators to sort-by (#13154) 2024-10-09 19:18:16 -07:00