nushell/crates/nu-command/src
panicbit 56ed1eb807
parse: collect external stream chunks before matching (#9950)
<!--
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
-->

# Description
This PR implements the workaround discussed in #9795, i.e. having
`parse` collect an external stream before operating on it with a regex.

- Should close #9795 

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->
- `parse` will give the correct output for external streams
- increased memory and time overhead due to collecting the entire stream
(no short-circuiting)

# 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 -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `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
> ```
-->
- formatting is checked
- clippy is happy
- no tests that weren't already broken fail
- added test case

# 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-08-08 06:48:13 -05:00
..
charting Categorification: move commands histogram and version out of the default category (#9946) 2023-08-07 09:23:53 -07:00
conversions Fix duration type to not report months or years (#9632) 2023-08-08 06:24:09 -05:00
database handle sqlite tables better by surrounding with brackets (#9752) 2023-07-20 11:20:56 -05:00
date rename from date format to format date (#9902) 2023-08-04 06:06:00 +12:00
debug Replace &Span with Span since Span is Copy (#9770) 2023-07-31 21:47:46 +02:00
deprecated remove old deprecated commands (#9840) 2023-08-06 06:42:16 -05:00
env Input output checking (#9680) 2023-07-14 15:20:35 +12:00
experimental Add functions for each Value case (#9736) 2023-07-21 08:20:33 -05:00
filesystem fix removing symlinks on windows (#9704) 2023-07-20 20:16:03 +02:00
filters Categorification: move from Default category to Filters (#9945) 2023-08-07 08:33:30 -07:00
formats Categorification: graduate nuon --- from the experimental category to the formats category (#9932) 2023-08-07 05:09:44 +12:00
generators Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
hash Fix signatures for cellpath access of records (#9793) 2023-07-26 23:13:57 +02:00
help Move help commands to use more structure in signatures (#9949) 2023-08-08 08:33:01 +12:00
math Replace &Span with Span since Span is Copy (#9770) 2023-07-31 21:47:46 +02:00
misc REFACTOR: move source out of deprecated commands (#9060) 2023-05-04 00:02:03 +02:00
network Accept records for http subcommand headers (-H) (#9771) 2023-07-30 22:28:48 +02:00
path Categorification: move Path commands out of the default category (#9937) 2023-08-07 16:03:23 +12:00
platform Replace &Span with Span since Span is Copy (#9770) 2023-07-31 21:47:46 +02:00
random Add functions for each Value case (#9736) 2023-07-21 08:20:33 -05:00
shells Fix usage for the exit command. (#9450) 2023-06-16 10:09:02 +02:00
strings parse: collect external stream chunks before matching (#9950) 2023-08-08 06:48:13 -05:00
system Enable macOS foreground process handling (#9909) 2023-08-04 15:43:35 -05:00
viewers Make Value::columns return slice instead of cloned Vec (#9927) 2023-08-07 21:43:32 +02:00
default_context.rs Cratification: move some str case commands to nu-cmd-extra (#9926) 2023-08-06 06:40:44 -07:00
example_test.rs Remove Signature.vectorizes_over_list entirely (#9777) 2023-07-26 23:34:43 +02:00
hook.rs Auto-expand table based on terminal width (#9934) 2023-08-08 05:47:23 -05:00
lib.rs cratification: move the bytes command to nu-cmd-extra (#9509) 2023-06-23 12:23:08 -07:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Support passing an empty list to sort, uniq, sort-by, and uniq-by (issue #5957) (#8669) 2023-03-29 19:55:38 -07:00