nushell/crates
Wind 58c6fea60b
Support redirect stderr and stdout+stderr with a pipe (#11708)
# Description
Close: #9673
Close: #8277
Close: #10944

This pr introduces the following syntax:
1. `e>|`, pipe stderr to next command. Example: `$env.FOO=bar nu
--testbin echo_env_stderr FOO e>| str length`
2. `o+e>|` and `e+o>|`, pipe both stdout and stderr to next command,
example: `$env.FOO=bar nu --testbin echo_env_mixed out-err FOO FOO e+o>|
str length`

Note: it only works for external commands. ~There is no different for
internal commands, that is, the following three commands do the same
things:~ Edit: it raises errors if we want to pipes for internal
commands
``` 
❯ ls e>| str length
Error:   × `e>|` only works with external streams
   ╭─[entry #1:1:1]
 1 │ ls e>| str length
   ·    ─┬─
   ·     ╰── `e>|` only works on external streams
   ╰────

❯ ls e+o>| str length
Error:   × `o+e>|` only works with external streams
   ╭─[entry #2:1:1]
 1 │ ls e+o>| str length
   ·    ──┬──
   ·      ╰── `o+e>|` only works on external streams
   ╰────
```

This can help us to avoid some strange issues like the following:

`$env.FOO=bar (nu --testbin echo_env_stderr FOO) e>| str length`

Which is hard to understand and hard to explain to users.

# User-Facing Changes
Nan

# Tests + Formatting
To be done

# After Submitting
Maybe update documentation about these syntax.
2024-02-09 01:30:46 +08:00
..
nu_plugin_custom_values bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu_plugin_example bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu_plugin_formats Bump indexmap from 2.1.0 to 2.2.2 (#11746) 2024-02-08 12:31:41 +00:00
nu_plugin_gstat bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu_plugin_inc bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-cli Support redirect stderr and stdout+stderr with a pipe (#11708) 2024-02-09 01:30:46 +08:00
nu-cmd-base Bump indexmap from 2.1.0 to 2.2.2 (#11746) 2024-02-08 12:31:41 +00:00
nu-cmd-dataframe Bump indexmap from 2.1.0 to 2.2.2 (#11746) 2024-02-08 12:31:41 +00:00
nu-cmd-extra bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-cmd-lang bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-color-config bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-command Support redirect stderr and stdout+stderr with a pipe (#11708) 2024-02-09 01:30:46 +08:00
nu-engine Support redirect stderr and stdout+stderr with a pipe (#11708) 2024-02-09 01:30:46 +08:00
nu-explore Upgrade to ratatui 0.26 (#11742) 2024-02-08 08:15:45 +08:00
nu-glob bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-json bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-lsp Bump miette from 5.10.0 to 7.0.0 (#11788) 2024-02-07 19:26:18 -06:00
nu-parser Support redirect stderr and stdout+stderr with a pipe (#11708) 2024-02-09 01:30:46 +08:00
nu-path bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-plugin bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-pretty-hex bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-protocol Support redirect stderr and stdout+stderr with a pipe (#11708) 2024-02-09 01:30:46 +08:00
nu-std Bump miette from 5.10.0 to 7.0.0 (#11788) 2024-02-07 19:26:18 -06:00
nu-system bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-table bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-term-grid bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-test-support bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
nu-utils bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06: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.