nushell / nushell

A new type of shell
https://www.nushell.sh/
MIT License
31.62k stars 1.62k forks source link

tee changes the input #13489

Closed j-xella closed 1 week ago

j-xella commented 1 month ago

Describe the bug

tee converts everything to lists. So:

BUT !!!

This happens not only to the output of tee, but also to the input that is passed to the closure

How to reproduce

Try the above examples, see the output.

Expected behavior

tee should not tamper with the data passed to it, but forward it as is.

Or is this an expected behaviour? Help doesn't mention it...

Screenshots

No response

Configuration

key value
version 0.96.1
major 0
minor 96
patch 1
branch
commit_hash f7d6c28a001f94f224e459e21df0da2ab5bdc923
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.77.2 (25ef9e3d8 2024-04-09)
rust_channel 1.77.2-x86_64-pc-windows-msvc
cargo_version cargo 1.77.2 (e52e36006 2024-03-26)
build_time 2024-07-29 23:44:03 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, system-clipboard, trash
installed_plugins

Additional context

No response

fdncred commented 1 month ago

@devyn thoughts on this?

devyn commented 1 month ago

Yeah, someone else reported this a while ago. I didn't really intend for tee to be used on non-iterables, and it will probably require a separate code path to do this, but I think it makes sense.