Skip to content

allow streaming to commands with union-typed pipeline input#17048

Merged
WindSoilder merged 1 commit intonushell:mainfrom
sgvictorino:pipeline-oneof
Nov 22, 2025
Merged

allow streaming to commands with union-typed pipeline input#17048
WindSoilder merged 1 commit intonushell:mainfrom
sgvictorino:pipeline-oneof

Conversation

@sgvictorino
Copy link
Copy Markdown
Contributor

@sgvictorino sgvictorino commented Nov 20, 2025

Closes #17031

Release notes summary - What our users need to know

Commands whose input signatures are declared with oneof now accept
streams instead of erroring:

> def f []: [oneof<list> -> nothing] {}
> [] | each {} | f
Error: nu::shell::only_supports_this_input_type

  × Input type not supported.
   ╭─[entry #2:1:6]
 1 │ [] | each {} | f
   ·      ──┬─      ┬
   ·        │       ╰── only oneof<list<any>> input data is supported
   ·        ╰── input type: list<any>

Commands whose input signatures are declared with `oneof` now accept
streams instead of erroring:

```
> def f []: [oneof<list> -> nothing] {}
> [] | each {} | f
Error: nu::shell::only_supports_this_input_type

  × Input type not supported.
   ╭─[entry #2:1:6]
 1 │ [] | each {} | f
   ·      ──┬─      ┬
   ·        │       ╰── only oneof<list<any>> input data is supported
   ·        ╰── input type: list<any>
```
Copy link
Copy Markdown
Contributor

@WindSoilder WindSoilder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@WindSoilder WindSoilder merged commit 48d63df into nushell:main Nov 22, 2025
16 checks passed
@github-actions github-actions bot added this to the v0.109.0 milestone Nov 22, 2025
@WindSoilder WindSoilder added notes:fixes Include the release notes summary in the "Bug fixes" section notes:ready The "Release notes summary" section of this PR is ready to be included in our release notes. labels Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:fixes Include the release notes summary in the "Bug fixes" section notes:ready The "Release notes summary" section of this PR is ready to be included in our release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oneof<list<any>> in IO types rejects a list stream

2 participants