mirror of
https://github.com/nushell/nushell.git
synced 2024-11-08 09:34:30 +01:00
b8d37a7541
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx
you can also mention related issues, PRs or discussions!
-->
# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.
Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->
Fixes https://github.com/nushell/nushell/issues/11716
The problem is in our [record creation
API](
|
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
Plugin Example
Crate with a simple example of the Plugin trait that needs to be implemented in order to create a binary that can be registered into nushell declaration list
example config
This subcommand demonstrates sending configuration from the nushell $env.config
to a plugin.
To register from after building nushell
run:
register target/debug/nu_plugin_example
The configuration for the plugin lives in $env.config.plugins.example
:
$env.config = {
plugins: {
example: [
some
values
]
}
}
To list plugin values run:
nu-example-config