nushell/crates/nu-command/src
Devyn Cairns c10aa2cf09
collect: don't require a closure (#12788)
# Description

This changes the `collect` command so that it doesn't require a closure.
Still allowed, optionally.

Before:

```nushell
open foo.json | insert foo bar | collect { save -f foo.json }
```

After:

```nushell
open foo.json | insert foo bar | collect | save -f foo.json
```

The closure argument isn't really necessary, as collect values are also
supported as `PipelineData`.

# User-Facing Changes
- `collect` command changed

# Tests + Formatting
Example changed to reflect.

# After Submitting
- [ ] release notes
- [ ] we may want to deprecate the closure arg?
2024-05-17 18:46:03 +02:00
..
bytes Support ByteStreams in bytes starts-with and bytes ends-with (#12887) 2024-05-17 07:59:08 +08:00
charting Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
conversions Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
database Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
date ListStream touchup (#12524) 2024-05-05 16:00:59 +00:00
debug Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
env Remove usages of Call::positional_nth (#12871) 2024-05-15 19:59:42 +02:00
experimental Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
filesystem collect: don't require a closure (#12788) 2024-05-17 18:46:03 +02:00
filters Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
formats Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
generators Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
hash Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
help Add Span merging functions (#12511) 2024-05-16 22:34:49 +00:00
math ListStream touchup (#12524) 2024-05-05 16:00:59 +00:00
misc Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
network Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
path Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
platform Add Span merging functions (#12511) 2024-05-16 22:34:49 +00:00
random ListStream touchup (#12524) 2024-05-05 16:00:59 +00:00
removed Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
shells Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
stor Fix improperly escaped strings in stor insert (#12820) 2024-05-13 20:22:39 -05:00
strings Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
system Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
viewers Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
default_context.rs Add sys users command (#12787) 2024-05-07 07:52:02 -05:00
example_test.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
lib.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
progress_bar.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
sort_utils.rs Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00