Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdncred/nu_plugin_template
https://github.com/fdncred/nu_plugin_template
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fdncred/nu_plugin_template
- Owner: fdncred
- License: mit
- Created: 2022-12-18T22:14:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-20T18:01:56.000Z (about 1 year ago)
- Last Synced: 2024-01-16T20:06:12.781Z (6 months ago)
- Language: Rust
- Size: 16.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-nu - nu_plugin_template - generate` template for making it easier to create nushell plugins. (Plugins)
README
# nu_plugin_template
This is a starter plugin. It just lays out one way to make nushell plugins with nushell version 0.72.0
This template is intended to be used with [cargo-generate](https://github.com/cargo-generate/cargo-generate) in order to quickly
bootstrap nushell plugin projects.## Usage:
```
> cargo generate --git https://github.com/fdncred/nu_plugin_template
Project Name:
What should we call the plugin struct?:
What is the name of this plugin package?
> cd nu-plugin-random
> cargo build# You only need to run this once per nushell session, or after updating the
# signature of the plugin.
> register ./target/debug/nu-plugin-random> 'pas' | random faux
Hello, faux! with value: pas
```## Config values
- `plugin_name` - all nushell plugins are binaries with the name format
`nu_plugin_SOMETHING`. This is how nushell discovers them. You need to tell this
generator what that `SOMETHING` is. If you enter `random` as the plugin name,
your binary will be called `nu_plugin_random`, and you will run it by entering
`random`.- `plugin_struct` - name of the struct that implements the `Plugin` trait from
`nu-plugin` crate.