nushell/crates/nu-command/tests
Ian Manske cc781a1ecd
Make group-by return errors in closure (#12508)
# Description
When a closure if provided to `group-by`, errors that occur in the
closure are currently ignored. That is, `group-by` will fall back and
use the `"error"` key if an error occurs. For example, the code snippet
below will group all `ls` entries under the `"error"` column.
```nushell
ls | group-by { get nope } 
```

This PR changes `group-by` to instead bubble up any errors triggered
inside the closure. In addition, this PR also does some refactoring and
cleanup inside `group-by`.

# User-Facing Changes
Errors are now returned from the closure provided to `group-by` instead
of falling back to the `"error"` group/key.
2024-04-16 21:52:21 +02:00
..
commands Make group-by return errors in closure (#12508) 2024-04-16 21:52:21 +02:00
format_conversions Range refactor (#12405) 2024-04-06 09:04:56 -05:00
main.rs ♻️ rework some help strings (#12306) 2024-03-27 08:41:02 -05:00