nushell/crates/nu-command/src
Andrew Barnes a64e0956cd
Support binary data to stdin of run-external (#4984)
* Add test for passing binary data through externals

This change adds an ignored test to confirm that binary data is passed
correctly between externals to be enabled in a later commit along with
the fix.

To assist in platform agnostic testing of binary data a couple of
additional testbins were added to allow testing on `Value::Binary` inside
`ExternalStream`.

* Support binary data to stdin of run-external

Prior to this change, any pipeline producing binary data (not detected
as string) then feed into an external would be ignored due to
run-external only supporting `Value::String` on stdin.

This change adds binary stdin support for externals allowing something
like this for example:

  〉^cat /dev/urandom | ^head -c 1MiB | ^pv -b | ignore
  1.00MiB

This would previously output `0.00 B [0.00 B/s]` due to the data not
being pushed to stdin at each stage.
2022-03-27 15:35:59 +13:00
..
conversions CantConvert improvements (#4926) 2022-03-24 07:04:31 -05:00
core_commands Add parser keyword note to help and $nu.scope (#4978) 2022-03-26 21:22:45 +02:00
dataframe Polars update (#4875) 2022-03-19 11:13:34 +00:00
date Update some examples and docs (#4682) 2022-03-01 08:05:29 -05:00
deprecated Add insert and update back (#4864) 2022-03-18 06:55:02 +13:00
env Do not pass non-string env vars to externals (#4748) 2022-03-12 00:18:39 +02:00
experimental Add example for enter, shells and view-source, update some docs (#4604) 2022-02-22 09:16:56 -06:00
filesystem fix ls when file is a socket on mac (#4983) 2022-03-26 21:26:39 -05:00
filters Fix 4946 (#4951) 2022-03-25 20:48:01 +13:00
formats Add escapes to 'to nuon' (#4964) 2022-03-26 08:35:37 +13:00
generators Try again with math-like externals (#4629) 2022-02-24 14:02:28 -05:00
hash Fix some examples and regenerate docs, should fix: #4455 (#4639) 2022-02-25 08:14:15 -05:00
math fix typo, update some examples and regenerate docs (#4718) 2022-03-04 06:10:09 -06:00
network Fix external extra (#4777) 2022-03-07 20:17:33 -05:00
path Fix path join on streams (#4959) 2022-03-26 07:46:48 +13:00
platform add a display of what the colors look like in ansi --list (#4866) 2022-03-18 06:27:33 -05:00
random Another batch of command tests (#4496) 2022-02-16 07:38:02 -05:00
shells Experiment: Allow both $true/true and $false/false (#4696) 2022-03-02 19:55:03 -05:00
strings Externals shouldn't expand aliases (#4889) 2022-03-22 11:57:48 +13:00
system Support binary data to stdin of run-external (#4984) 2022-03-27 15:35:59 +13:00
viewers added nu-utils crate, fixed issue where externals turn off vt processing (#4857) 2022-03-16 17:21:06 -05:00
default_context.rs Add export alias and export extern (#4878) 2022-03-20 07:58:01 +13:00
example_test.rs Add an alias denylist for expansions (#4871) 2022-03-19 08:03:57 +13:00
lib.rs deprecated commands (#4405) 2022-02-10 12:55:19 +00:00