add usage for plugin commands (#8138)

# Description

As title

# User-Facing Changes

_(List of all changes that impact the user experience here. This helps
us keep track of breaking changes.)_

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
This commit is contained in:
WindSoilder 2023-02-20 23:03:17 +08:00 committed by GitHub
parent b9be416937
commit 8e84e33638
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,18 +17,22 @@ impl Plugin for FromCmds {
"How many bytes of the body to preview",
Some('b'),
)
.usage("Parse text as .eml and create record.")
.plugin_examples(eml::examples())
.category(Category::Formats),
PluginSignature::build(ics::CMD_NAME)
.input_output_types(vec![(Type::String, Type::Table(vec![]))])
.usage("Parse text as .ics and create table.")
.plugin_examples(ics::examples())
.category(Category::Formats),
PluginSignature::build(vcf::CMD_NAME)
.input_output_types(vec![(Type::String, Type::Table(vec![]))])
.usage("Parse text as .vcf and create table.")
.plugin_examples(vcf::examples())
.category(Category::Formats),
PluginSignature::build(ini::CMD_NAME)
.input_output_types(vec![(Type::String, Type::Record(vec![]))])
.usage("Parse text as .ini and create table.")
.plugin_examples(ini::examples())
.category(Category::Formats),
]