mirror of
https://github.com/nushell/nushell.git
synced 2025-03-14 15:38:29 +01:00
- this PR addresses most of the points in #13153 # Description - make `split list` support streaming - **[BREAKING CHANGE]** if the input is split on consecutive items, the empty lists between those items are preserved. e.g. `[1 1 0 0 3 3 0 4 4] | split list 0` == `[[1 1] [] [2 2] [3 3]]` - accept a closure as argument, the closure is called for each item, and if it returns `true` the list is split on that item - added `--split` flag, which allows keeping the separator items. `--split=after` splits the list *after* the separator and `--split=before` splits the list *before* the separator. `--split=on` is the default behavior where the separator is lost # User-Facing Changes `split list`: - keeps empty sublists - allows using a closure to determine items to split on - allows keeping the separator items with `--split=after` and `--split=before` # Tests + Formatting - 🟢 toolkit fmt - 🟢 toolkit clippy - 🟢 toolkit test - 🟢 toolkit test stdlib # After Submitting N/A --------- Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE | ||
README.md |
This crate contains the majority of our commands
We allow ourselves to move some of the commands in nu-command
to nu-cmd-*
crates as needed.
Internal Nushell crate
This crate implements components of Nushell and is not designed to support plugin authors or other users directly.