mirror of
https://github.com/nushell/nushell.git
synced 2024-11-24 17:34:00 +01:00
e281c03403
# Description Close: #12083 Close: #12084 # User-Facing Changes It's a breaking change because we have switched the position of `<initial>` and `<closure>`, after the change, initial value will be optional. So it's possible to do something like this: ```nushell > let f = {|fib = [0, 1]| {out: $fib.0, next: [$fib.1, ($fib.0 + $fib.1)]} } > generate $f | first 5 ╭───┬───╮ │ 0 │ 0 │ │ 1 │ 1 │ │ 2 │ 1 │ │ 3 │ 2 │ │ 4 │ 3 │ ╰───┴───╯ ``` It will also raise error if user don't give initial value, and the closure don't have default parameter. ```nushell ❯ let f = {|fib| {out: $fib.0, next: [$fib.1, ($fib.0 + $fib.1)]} } ❯ generate $f Error: × The initial value is missing ╭─[entry #5:1:1] 1 │ generate $f · ────┬─── · ╰── Missing intial value ╰──── help: Provide <initial> value in generate, or assigning default value to closure parameter ``` # Tests + Formatting Added some test cases. --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com> |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_nu_example | ||
nu_plugin_polars | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu_plugin_stress_internals | ||
nu-cli | ||
nu-cmd-base | ||
nu-cmd-extra | ||
nu-cmd-lang | ||
nu-cmd-plugin | ||
nu-color-config | ||
nu-command | ||
nu-derive-value | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-lsp | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-plugin-core | ||
nu-plugin-engine | ||
nu-plugin-protocol | ||
nu-plugin-test-support | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-std | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
nuon | ||
README.md |
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.