forked from extern/nushell
ed1f0eb231
A small follow-up to #7221. This changes the `catch` block from a block to a closure, so that it can access the error returned from the `try` block. This helps with a common scenario: "the `try` block failed, and I want to log why it failed." ### Example ![image](https://user-images.githubusercontent.com/26268125/203841966-f1f8f102-fd73-41e6-83bc-bf69ed436fa8.png) ### Future Work Nu's closure syntax is a little awkward here; it might be nicer to allow something like `catch err { print $err }`. We discussed this on Discord and it will require special parser code similar to what's already done for `for`. I'm not feeling confident enough in my parser knowledge to make that change; I will spend some more time looking at the `for` code but I doubt I will be able to implement anything in the next few days. Volunteers welcome. |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu-cli | ||
nu-color-config | ||
nu-command | ||
nu-engine | ||
nu-glob | ||
nu-json | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
old | ||
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.