nushell/crates/nu_plugin_once
2024-08-03 21:48:04 +02:00
..
src Add nu_plugin_once base and cross-rs config 2024-08-03 21:48:04 +02:00
Cargo.toml Add nu_plugin_once base and cross-rs config 2024-08-03 21:48:04 +02:00
README.md Add nu_plugin_once base and cross-rs config 2024-08-03 21:48:04 +02:00

Plugin Once

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

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

The configuration for the plugin lives in $env.config.plugins.once:

$env.config = {
  plugins: {
    once: [
      some
      values
    ]
  }
}

To list plugin values run:

once config