mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 00:13:21 +01:00
92831d7efc
# Description This PR adds a new `echo` command to the `nu_plugin_example` plugin that simply [streams all of its input to its output](https://github.com/nushell/nushell/pull/12754/files#diff-de9fcf086b8c373039dadcc2bcb664c6014c0b2af8568eab68c0b6666ac5ccceR47). ``` : "hi" | example echo hi ``` The motivation for adding it is to have a convenient command to exercise interactivity on slow pipelines. I'll follow up on that front with [another PR](https://github.com/cablehead/nushell/pull/1/files) # Tests + Formatting https://github.com/nushell/nushell/pull/12754/files#diff-de9fcf086b8c373039dadcc2bcb664c6014c0b2af8568eab68c0b6666ac5ccceR51-R55 |
||
---|---|---|
.. | ||
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:
example config