mirror of
https://codeberg.org/tyy/aspm
synced 2024-12-22 20:39:29 -07:00
25 lines
No EOL
539 B
Text
25 lines
No EOL
539 B
Text
{
|
|
"Create naja subcommand": {
|
|
"scope": "rust",
|
|
"prefix": "subcommand",
|
|
"body": [
|
|
"use clap::Parser;",
|
|
"",
|
|
"use crate::commands::NajaSubcommand;",
|
|
"",
|
|
"/// $2",
|
|
"#[derive(Parser, Debug)]",
|
|
"pub struct $1Command { }",
|
|
"",
|
|
"#[async_trait::async_trait]",
|
|
"impl NajaSubcommand for $1Command {",
|
|
"\tasync fn execute(self, state: crate::CliState) -> Result<(), anyhow::Error> {",
|
|
"\t\t",
|
|
"\t\t",
|
|
"\t\tOk(())",
|
|
"\t}",
|
|
"}",
|
|
],
|
|
"description": "Create a template for an naja subcommand"
|
|
}
|
|
} |