nushell/crates
Bahex e5cec8f4eb
fix(group-by): re #14337 name collision prevention (#14360)
A more involved solution to the issue pointed out
[here](https://github.com/nushell/nushell/pull/14337#issuecomment-2480392373)

# Description

With `--to-table`
- cell-path groupers are used to create column names, similar to
`select`
- closure groupers result in columns named `closure_{i}` where `i` is
the index of argument, with regards to other closures i.e. first closure
grouper results in a column named `closure_0`

  Previously
  - `group-by foo {...} {...}` => `table<foo, group1, group2, items>`
  - `group-by {...} foo {...}` => `table<group0, foo, group2, items>`
  
  With this PR
- `group-by foo {...} {...}` => `table<foo, closure_0, closure_1,
items>`
- `group-by {...} foo {...}` => `table<closure_0, foo, closure_1,
items>`
- no grouper argument results in a `table<group, items>` as previously

On naming conflicts caused by cell-path groupers named `items` or
`closure_{i}`, an error is thrown, suggesting to use a closure in place
of a cell-path.

```nushell
❯ ls | rename items | group-by items --to-table 
Error:   × grouper arguments can't be named `items`
   ╭─[entry #3:1:29]
 1 │ ls | rename items | group-by items --to-table 
   ·                             ────────┬────────
   ·                                     ╰── contains `items`
   ╰────
  help: instead of a cell-path, try using a closure
```
And following the suggestion:
```nushell
❯ ls | rename items | group-by { get items } --to-table 
╭─#──┬──────closure_0──────┬───────────────────────────items────────────────────────────╮
│ 0  │ CITATION.cff        │ ╭─#─┬────items─────┬─type─┬─size──┬───modified───╮         │
│    │                     │ │ 0 │ CITATION.cff │ file │ 812 B │ 3 months ago │         │
│    │                     │ ╰─#─┴────items─────┴─type─┴─size──┴───modified───╯         │
│ 1  │ CODE_OF_CONDUCT.md  │ ╭─#─┬───────items────────┬─type─┬──size───┬───modified───╮ │
...
```
2024-11-17 17:25:53 -06:00
..
nu_plugin_custom_values Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu_plugin_example Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu_plugin_formats Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu_plugin_gstat Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu_plugin_inc Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu_plugin_nu_example Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu_plugin_polars Fix doc and code comment typos (#14366) 2024-11-17 19:17:35 +01:00
nu_plugin_python Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu_plugin_query Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu_plugin_stress_internals Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-cli fix ansi bleed over on right prompt (#14357) 2024-11-17 19:47:09 +08:00
nu-cmd-base Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-cmd-extra Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-cmd-lang Remove the NU_DISABLE_IR option (#14293) 2024-11-15 12:09:25 +08:00
nu-cmd-plugin Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-color-config Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-command fix(group-by): re #14337 name collision prevention (#14360) 2024-11-17 17:25:53 -06:00
nu-derive-value Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-engine Remove the NU_DISABLE_IR option (#14293) 2024-11-15 12:09:25 +08:00
nu-explore Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-glob skip test_iteration_errors if /root is missing (#14299) 2024-11-14 10:13:04 +01:00
nu-json Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-lsp Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-parser Allow duration to be added to date (#14295) 2024-11-14 10:07:37 +01:00
nu-path Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-plugin Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-plugin-core Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-plugin-engine Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-plugin-protocol Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-plugin-test-support Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-pretty-hex Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-protocol Add proper config defaults for hooks (#14341) 2024-11-14 20:27:26 -08:00
nu-std add multiple grouper support to group-by (#14337) 2024-11-15 06:40:49 -06:00
nu-system Cut down unnecessary lint allows (#14335) 2024-11-15 19:24:39 +01:00
nu-table Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-term-grid Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nu-test-support Remove the NU_DISABLE_IR option (#14293) 2024-11-15 12:09:25 +08:00
nu-utils Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
nuon Bump to dev version 0.100.1 (#14328) 2024-11-14 10:04:39 +01:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.