style
This commit is contained in:
parent
886a37ab41
commit
2814e88011
14
src/main.rs
14
src/main.rs
@ -3,21 +3,21 @@ use std::path::PathBuf;
|
|||||||
use clap::{Args,Parser,Subcommand};
|
use clap::{Args,Parser,Subcommand};
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
#[command(author, version, about, long_about = None)]
|
#[command(author,version,about,long_about=None)]
|
||||||
#[command(propagate_version = true)]
|
#[command(propagate_version=true)]
|
||||||
struct Cli {
|
struct Cli{
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
command: Commands,
|
command:Commands,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
enum Commands {
|
enum Commands{
|
||||||
RunScript(RunScriptSubcommand),
|
RunScript(RunScriptSubcommand),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct RunScriptSubcommand {
|
struct RunScriptSubcommand{
|
||||||
#[arg(long)]
|
#[arg()]
|
||||||
input_file:PathBuf,
|
input_file:PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user