nushell/crates/nu_plugin_example
Andy Gayton 8c69461aaa wip
2024-07-04 23:22:45 -04:00
..
src Use IntoValue and FromValue derive macros in nu_plugin_example for example usage (#13220) 2024-06-26 17:50:14 -05:00
Cargo.toml Bumping version to 0.95.1 (#13231) 2024-06-25 18:26:07 -07:00
README.md wip 2024-07-04 23:22:45 -04:00

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 make use of the plugin after building nushell run:

plugin add target/debug/nu_plugin_example
# or then either restart your current nushell session or run:
plugin use 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:

example config