nushell/crates
Mudada 1349187e17
Add --raw to find command (#14970)
<!--
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
<!--
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.
-->
When using `find`, we insert ansi code.

This is great for visual but it make comparison a tedious task.

For exemple

```nu
> ([{a: 1 b: 1}] | find 1 | get 0 | get a) == 1
# false
```
The documentation recommand using the `ansi strip` command but you then
lose your typing converting it to a string.
```nu
> [{a: 1 b: 1}] | find 1 | get 0 | get a | ansi strip | describe
# string
```
And this makes me very sad 😢 .

The idea here is to have a simple option to keep the usage of `find`
without the ansi marking.
```nu
> ([{a: 1 b: 1}] | find --raw 1 | get 0 | get a) == 1
# true
```

Tbh I think we could also do a fix on the parser to really escape the
ansi makers but this sounded like way more work so I would like your
opinion on this before working on it.

Also note that this is my first time writting rust and trying to
contribute to nushell so if you see any weird shenanigans be sure to
tell me !
# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->
A new flag for find
# 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 toolkit.nu; toolkit test stdlib"` 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
> ```
-->
For testing I updated all the previous `find` test to also run them with
this new flag just to be sure that we didn't lose any other
functionalities
# 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.
-->

---------

Co-authored-by: Tangui <mael.nicolas@clever-cloud.com>
2025-01-30 18:27:55 -06:00
..
nu_plugin_custom_values Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_example Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_formats Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_gstat Bump git2 from 0.19.0 to 0.20.0 (#14776) 2025-01-08 13:53:02 +00:00
nu_plugin_inc Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_nu_example Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_polars Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
nu_plugin_python Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_query Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_stress_internals Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-cli fix(cli): completion in nested blocks (#14856) 2025-01-30 01:15:38 -05:00
nu-cmd-base Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-cmd-extra Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
nu-cmd-lang Bump shadow-rs from 0.37.0 to 0.38.0 (#14952) 2025-01-29 08:56:27 +08:00
nu-cmd-plugin Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
nu-color-config Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-command Add --raw to find command (#14970) 2025-01-30 18:27:55 -06:00
nu-derive-value Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-engine Immediately return error if detected as pipeline input or positional argument (#14874) 2025-01-30 06:47:22 -06:00
nu-explore Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
nu-glob Create nu_glob::is_glob function (#14717) 2025-01-01 19:04:17 -05:00
nu-json Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-lsp fix(completion): DotNuCompletion now completes nu scripts in const $NU_LIB_DIRS (#14955) 2025-01-29 05:54:12 -06:00
nu-parser fix(parser): mixed side effects of different choices in parse_oneof (#14912) 2025-01-30 06:30:45 -06:00
nu-path Use ref-cast crate to remove some unsafe (#14897) 2025-01-26 12:43:45 -08:00
nu-plugin Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
nu-plugin-core Replaced IoError::new calls that still had Span::unknown() (#14968) 2025-01-30 06:20:26 -06:00
nu-plugin-engine Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
nu-plugin-protocol Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-plugin-test-support Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
nu-pretty-hex Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-protocol fix range bugs in str substring, str index-of, slice, bytes at (#14863) 2025-01-30 06:50:01 -06:00
nu-std Rename std/core to std/prelude (#14962) 2025-01-29 11:16:12 -05:00
nu-system Replace std::time::Instant with web_time::Instant (#14668) 2024-12-25 16:50:02 +08:00
nu-table Fix #14842 (#14885) 2025-01-22 06:49:25 -06:00
nu-term-grid Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-test-support Improve and fix filesize formatting/display (#14397) 2025-01-22 22:24:51 -08:00
nu-utils Improve and fix filesize formatting/display (#14397) 2025-01-22 22:24:51 -08:00
nuon fix nuon conversions of range values (#14687) 2025-01-07 21:29:39 +01:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.