nushell/crates/nu-command/src
Marika Chlebowska fa83458a6d
Add metadata to some filters (#11160)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
This PR preserves metadata when running some filters. As discussed on
discord that helps when running for example `ls | reject modified`
because it keeps colouring and links.
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2023-11-27 12:16:34 -06:00
..
bytes Convert ShellError::UnsupportedInput to named fields (#10971) 2023-11-07 23:25:32 +01:00
charting Use Vec for Closure captures (#10940) 2023-11-08 00:43:28 +01:00
conversions into binary -c: return 0 as single byte (#11068) 2023-11-16 04:09:31 -06:00
database Implement Display for CellPath (#11023) 2023-11-10 21:12:51 +01:00
date Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00
debug Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00
env Convert FileNotFoundCustom to named fields (#11123) 2023-11-21 17:30:21 -06:00
experimental Add functions for each Value case (#9736) 2023-07-21 08:20:33 -05:00
filesystem Support o>>, e>>, o+e>> to append output to an external file (#10764) 2023-11-27 07:52:39 -06:00
filters Add metadata to some filters (#11160) 2023-11-27 12:16:34 -06:00
formats Support o>>, e>>, o+e>> to append output to an external file (#10764) 2023-11-27 07:52:39 -06:00
generators remove the unfold command (#10773) 2023-11-17 06:50:20 +08:00
hash Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
help Convert ShellError::AliasNotFound to named fields (#11118) 2023-11-21 16:24:08 +08:00
math Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00
misc Add long options for misc and network (#10753) 2023-10-19 18:16:44 +02:00
network Convert ShellError::NetworkFailure to named fields (#11093) 2023-11-19 21:32:11 +01:00
path Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00
platform Add is-terminal to determine if stdin/out/err are a terminal (#10970) 2023-11-21 20:48:39 -06:00
random Add long options for platform and random (#10776) 2023-10-19 22:04:33 +02:00
removed Rename misused "deprecation" to removal (#10000) 2023-08-15 07:17:31 +12:00
shells Fix usage for the exit command. (#9450) 2023-06-16 10:09:02 +02:00
strings remove size command in favor of str stats (#10784) 2023-11-17 06:49:19 +08:00
system Convert FileNotFound to named fields (#11120) 2023-11-21 17:08:10 +08:00
viewers optimize/clean up a few of the table changes (#11076) 2023-11-16 11:37:46 -06:00
default_context.rs Add is-terminal to determine if stdin/out/err are a terminal (#10970) 2023-11-21 20:48:39 -06:00
example_test.rs feat: Add unfold command (#10489) 2023-09-30 09:08:06 -05:00
lib.rs Move eval_hook to nu-cmd-base (#10146) 2023-08-29 23:46:50 +02:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00